Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pyyaml from 5.4.1 to 6.0 in /tests #2096

Merged
merged 3 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PyYAML==5.4.1
PyYAML==6.0
requests==2.26.0
forcediphttpsadapter==1.0.2
kubernetes==20.11.0a1
Expand Down
5 changes: 3 additions & 2 deletions tests/suite/test_v_s_route_focused_canary.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import requests
import yaml

from yaml.loader import Loader
from settings import TEST_DATA
from suite.vs_vsr_resources_utils import create_virtual_server_from_yaml, create_v_s_route_from_yaml
from suite.fixtures import VirtualServerRoute
Expand All @@ -19,7 +20,7 @@ def get_weights_of_splitting(file) -> []:
"""
weights = []
with open(file) as f:
docs = yaml.load_all(f)
docs = yaml.load_all(f, Loader=Loader)
for dep in docs:
for item in dep['spec']['subroutes'][0]['matches'][0]['splits']:
weights.append(item['weight'])
Expand All @@ -35,7 +36,7 @@ def get_upstreams_of_splitting(file) -> []:
"""
upstreams = []
with open(file) as f:
docs = yaml.load_all(f)
docs = yaml.load_all(f, Loader=Loader)
for dep in docs:
for item in dep['spec']['subroutes'][0]['matches'][0]['splits']:
upstreams.append(item['action']['pass'])
Expand Down
5 changes: 3 additions & 2 deletions tests/suite/test_v_s_route_split_traffic.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from yaml.loader import Loader
import pytest
import requests
import yaml
Expand All @@ -16,7 +17,7 @@ def get_weights_of_splitting(file) -> []:
"""
weights = []
with open(file) as f:
docs = yaml.load_all(f)
docs = yaml.load_all(f, Loader=Loader)
for dep in docs:
for item in dep['spec']['subroutes'][0]['splits']:
weights.append(item['weight'])
Expand All @@ -32,7 +33,7 @@ def get_upstreams_of_splitting(file) -> []:
"""
upstreams = []
with open(file) as f:
docs = yaml.load_all(f)
docs = yaml.load_all(f, Loader=Loader)
for dep in docs:
for item in dep['spec']['subroutes'][0]['splits']:
upstreams.append(item['action']['pass'])
Expand Down