diff --git a/tests/integration/test_charm.py b/tests/integration/test_charm.py index 87225ed..3e3d60d 100644 --- a/tests/integration/test_charm.py +++ b/tests/integration/test_charm.py @@ -34,7 +34,7 @@ verbs=None, ) SELDON_CM_NAME = "seldon-config" -DEFAULT_NAMESPACE = "default" +WORKLOADS_NAMESPACE = "default" with open("tests/integration/test_data/expected_seldon_cm.json", "r") as json_file: SELDON_CONFIG = json.load(json_file) @@ -171,7 +171,7 @@ async def test_seldon_alert_rules(ops_test: OpsTest): # NOTE: This test is re-using deployments created in test_build_and_deploy() # Use namespace "default" to create seldon deployments # due to https://github.com/canonical/seldon-core-operator/issues/218 - namespace = DEFAULT_NAMESPACE + namespace = WORKLOADS_NAMESPACE client = Client() # setup Prometheus @@ -284,7 +284,7 @@ async def test_seldon_deployment(ops_test: OpsTest): # NOTE: This test is re-using deployment created in test_build_and_deploy() # Use namespace "default" to create seldon deployments # due to https://github.com/canonical/seldon-core-operator/issues/218 - namespace = DEFAULT_NAMESPACE + namespace = WORKLOADS_NAMESPACE client = Client() this_ns = client.get(res=Namespace, name=namespace) diff --git a/tests/integration/test_seldon_servers.py b/tests/integration/test_seldon_servers.py index 06abcff..691cbc2 100644 --- a/tests/integration/test_seldon_servers.py +++ b/tests/integration/test_seldon_servers.py @@ -35,7 +35,7 @@ verbs=None, ) TEST_LABEL = {"testing-seldon-deployments": "true"} -DEFAULT_NAMESPACE = "default" +WORKLOADS_NAMESPACE = "default" @pytest.fixture(scope="session") @@ -48,7 +48,7 @@ def lightkube_client() -> Client: @pytest.fixture(scope="module") def patch_namespace_with_seldon_label(lightkube_client: Client, ops_test: OpsTest): """Patch the current namespace with Seldon specific labels.""" - this_ns = lightkube_client.get(res=Namespace, name=DEFAULT_NAMESPACE) + this_ns = lightkube_client.get(res=Namespace, name=WORKLOADS_NAMESPACE) this_ns.metadata.labels.update({"serving.kubeflow.org/inferenceservice": "enabled"}) lightkube_client.patch(res=Namespace, name=this_ns.metadata.name, obj=this_ns) @@ -61,7 +61,7 @@ def remove_seldon_deployment(lightkube_client: Client, ops_test: OpsTest): # remove Seldon Deployment # Use namespace "default" to create seldon deployments # due to https://github.com/canonical/seldon-core-operator/issues/218 - namespace = DEFAULT_NAMESPACE + namespace = WORKLOADS_NAMESPACE resource_to_delete = lightkube_client.list( SELDON_DEPLOYMENT, namespace=namespace, labels=TEST_LABEL ) @@ -279,7 +279,7 @@ async def test_seldon_predictor_server( """ # Use namespace "default" to create seldon deployments # due to https://github.com/canonical/seldon-core-operator/issues/218 - namespace = DEFAULT_NAMESPACE + namespace = WORKLOADS_NAMESPACE # retrieve predictor server information and create Seldon Depoloyment with open(f"tests/assets/crs/{server_config}") as f: deploy_yaml = yaml.safe_load(f.read())