Skip to content
Open
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
9 changes: 5 additions & 4 deletions tests/suite/test_virtual_server_foreign_upstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ def virtual_server_foreign_upstream_app_setup(
:param test_namespace:
:return: VirtualServerSetup
"""
print("------------------------- Deploy Virtual Server Example -----------------------------------")
vs_source = f"{TEST_DATA}/{request.param['example']}/standard/virtual-server.yaml"
vs_name = create_virtual_server_from_yaml(kube_apis.custom_objects, vs_source, test_namespace)
vs_host = get_first_host_from_yaml(vs_source)
vs_paths = get_paths_from_vs_yaml(vs_source)
upstream_namespaces = get_upstream_namespace_from_vs_yaml(vs_source, test_namespace)
print(f"Upstream namespaces detected in the VS yaml: {upstream_namespaces}")
ns_1 = (
Expand All @@ -61,12 +57,17 @@ def virtual_server_foreign_upstream_app_setup(
if upstream_namespaces[1] != test_namespace
else test_namespace
)
print("------------------------- Deploy Virtual Server Example -----------------------------------")
create_items_from_yaml(kube_apis, f"{TEST_DATA}/common/app/{request.param['app_type']}/backend1.yaml", ns_1)
create_items_from_yaml(kube_apis, f"{TEST_DATA}/common/app/{request.param['app_type']}/backend2.yaml", ns_2)

wait_until_all_pods_are_ready(kube_apis.v1, ns_1)
wait_until_all_pods_are_ready(kube_apis.v1, ns_2)

vs_name = create_virtual_server_from_yaml(kube_apis.custom_objects, vs_source, test_namespace)
vs_host = get_first_host_from_yaml(vs_source)
vs_paths = get_paths_from_vs_yaml(vs_source)

def fin():
if request.config.getoption("--skip-fixture-teardown") == "no":
print("Clean up Virtual Server Example:")
Expand Down
Loading