Skip to content

Commit 53e9334

Browse files
committed
try fix enterprise tests
1 parent b791c36 commit 53e9334

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docker/mongodb-kubernetes-tests/tests/search/search_enterprise_tls.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def mdb(namespace: str, issuer_ca_configmap: str) -> MongoDB:
4545
)
4646
resource.configure(om=get_ops_manager(namespace), project_name=MDB_RESOURCE_NAME)
4747
resource.set_version(MDB_VERSION_WITHOUT_BUILT_IN_ROLE)
48-
resource["metadata"]["annotations"] = {MDB_SEARCH_FORCE_WIREPROTO_ANNOTATION: "true"}
4948

5049
if try_load(resource):
5150
return resource
@@ -62,6 +61,9 @@ def mdbs(namespace: str) -> MongoDBSearch:
6261
if try_load(resource):
6362
return resource
6463

64+
# force the wireproto transport initially because we're starting out with mongod 8.0.10
65+
resource["metadata"]["annotations"] = {MDB_SEARCH_FORCE_WIREPROTO_ANNOTATION: "true"}
66+
6567
# Add TLS configuration to MongoDBSearch
6668
if "spec" not in resource:
6769
resource["spec"] = {}
@@ -209,7 +211,7 @@ def check_mongod_parameters():
209211

210212
return parameters_are_set, f'Not all pods have mongot parameters set:\n{"\n".join(pod_parameters)}'
211213

212-
run_periodically(check_mongod_parameters, timeout=200)
214+
run_periodically(check_mongod_parameters, timeout=600)
213215

214216

215217
# After picking up MongoDBSearch CR, MongoDB reconciler will add mongod parameters to each process.
@@ -257,12 +259,15 @@ def test_check_polyfilled_role_in_ac(self, mdb: MongoDB):
257259
assert len(custom_roles) > 0
258260
assert "searchCoordinator" in [role["role"] for role in custom_roles]
259261

260-
def test_upgrade_to_mongo_8_2(self, mdb: MongoDB):
262+
def test_upgrade_to_mongo_8_2(self, mdb: MongoDB, mdbs: MongoDBSearch):
261263
mdb.set_version(MDB_VERSION_WITH_BUILT_IN_ROLE)
262-
del mdb["metadata"]["annotations"][MDB_SEARCH_FORCE_WIREPROTO_ANNOTATION]
263264
mdb.update()
264265
mdb.assert_reaches_phase(Phase.Running, timeout=600)
265266

267+
del mdbs["metadata"]["annotations"][MDB_SEARCH_FORCE_WIREPROTO_ANNOTATION]
268+
mdbs.update()
269+
mdbs.assert_reaches_phase(Phase.Running, timeout=300)
270+
266271
def test_check_polyfilled_role_not_in_ac(self, mdb: MongoDB):
267272
custom_roles = mdb.get_automation_config_tester().automation_config.get("roles", [])
268273
assert len(custom_roles) >= 0

0 commit comments

Comments
 (0)