Skip to content

Commit a23755c

Browse files
committed
create namespace before deploying VS
Signed-off-by: Haywood Shannon <[email protected]> Signed-off-by: Haywood Shannon <[email protected]>
1 parent 762b5a6 commit a23755c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/suite/test_virtual_server_foreign_upstream.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ def virtual_server_foreign_upstream_app_setup(
4444
:param test_namespace:
4545
:return: VirtualServerSetup
4646
"""
47-
print("------------------------- Deploy Virtual Server Example -----------------------------------")
47+
print("------------------------- Create namespaces -----------------------------------")
4848
vs_source = f"{TEST_DATA}/{request.param['example']}/standard/virtual-server.yaml"
49-
vs_name = create_virtual_server_from_yaml(kube_apis.custom_objects, vs_source, test_namespace)
50-
vs_host = get_first_host_from_yaml(vs_source)
51-
vs_paths = get_paths_from_vs_yaml(vs_source)
5249
upstream_namespaces = get_upstream_namespace_from_vs_yaml(vs_source, test_namespace)
5350
print(f"Upstream namespaces detected in the VS yaml: {upstream_namespaces}")
5451
ns_1 = (
@@ -61,6 +58,10 @@ def virtual_server_foreign_upstream_app_setup(
6158
if upstream_namespaces[1] != test_namespace
6259
else test_namespace
6360
)
61+
print("------------------------- Deploy Virtual Server Example -----------------------------------")
62+
vs_name = create_virtual_server_from_yaml(kube_apis.custom_objects, vs_source, test_namespace)
63+
vs_host = get_first_host_from_yaml(vs_source)
64+
vs_paths = get_paths_from_vs_yaml(vs_source)
6465
create_items_from_yaml(kube_apis, f"{TEST_DATA}/common/app/{request.param['app_type']}/backend1.yaml", ns_1)
6566
create_items_from_yaml(kube_apis, f"{TEST_DATA}/common/app/{request.param['app_type']}/backend2.yaml", ns_2)
6667

0 commit comments

Comments
 (0)