|
11 | 11 | from kubetester.certs import create_sharded_cluster_certs
|
12 | 12 | from kubetester.kubetester import ensure_ent_version
|
13 | 13 | from kubetester.kubetester import fixture as yaml_fixture
|
14 |
| -from kubetester.kubetester import ( |
15 |
| - get_default_architecture, |
16 |
| - is_default_architecture_static, |
17 |
| - run_periodically, |
18 |
| -) |
| 14 | +from kubetester.kubetester import get_default_architecture, run_periodically |
19 | 15 | from kubetester.mongodb import Phase
|
20 | 16 | from kubetester.mongodb_user import MongoDBUser
|
21 | 17 | from kubetester.opsmanager import MongoDBOpsManager
|
22 | 18 | from pytest import fixture
|
| 19 | +from tests.conftest import OPERATOR_NAME |
23 | 20 | from tests.olm.olm_test_commons import (
|
24 | 21 | get_catalog_image,
|
25 | 22 | get_catalog_source_resource,
|
@@ -64,11 +61,11 @@ def catalog_source(namespace: str, version_id: str):
|
64 | 61 | def subscription(namespace: str, catalog_source: CustomObject):
|
65 | 62 | static_value = get_default_architecture()
|
66 | 63 | return get_subscription_custom_object(
|
67 |
| - "mongodb-kubernetes", |
| 64 | + OPERATOR_NAME, |
68 | 65 | namespace,
|
69 | 66 | {
|
70 | 67 | "channel": "stable", # stable channel contains latest released operator in RedHat's certified repository
|
71 |
| - "name": "mongodb-enterprise", |
| 68 | + "name": "mongodb-kubernetes", |
72 | 69 | "source": catalog_source.name,
|
73 | 70 | "sourceNamespace": namespace,
|
74 | 71 | "installPlanApproval": "Automatic",
|
@@ -100,7 +97,7 @@ def test_install_stable_operator_version(
|
100 | 97 | subscription: CustomObject,
|
101 | 98 | ):
|
102 | 99 | subscription.update()
|
103 |
| - wait_for_operator_ready(namespace, "mongodb-kubernetes", f"mongodb-kubernetes.v{current_operator_version}") |
| 100 | + wait_for_operator_ready(namespace, OPERATOR_NAME, f"mongodb-kubernetes.v{current_operator_version}") |
104 | 101 |
|
105 | 102 |
|
106 | 103 | # install resources on the latest released version of the operator
|
@@ -368,7 +365,7 @@ def update_subscription() -> bool:
|
368 | 365 |
|
369 | 366 | run_periodically(update_subscription, timeout=100, msg="Subscription to be updated")
|
370 | 367 |
|
371 |
| - wait_for_operator_ready(namespace, "mongodb-kubernetes", f"mongodb-kubernetes.v{incremented_operator_version}") |
| 368 | + wait_for_operator_ready(namespace, OPERATOR_NAME, f"mongodb-kubernetes.v{incremented_operator_version}") |
372 | 369 |
|
373 | 370 |
|
374 | 371 | @pytest.mark.e2e_olm_operator_upgrade_with_resources
|
|
0 commit comments