Skip to content

Commit 853a47f

Browse files
committed
Review fixes
1 parent e3fa3e7 commit 853a47f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ def test_create_search_resource(mdbs: MongoDBSearch):
187187
mdbs.assert_reaches_phase(Phase.Running, timeout=300)
188188

189189

190-
@mark.e2e_search_enterprise_tls
191-
def test_wait_for_database_resource_ready(mdb: MongoDB):
192-
mdb.assert_reaches_phase(Phase.Running, timeout=300)
193-
194-
195190
@mark.e2e_search_enterprise_tls
196191
def test_wait_for_mongod_parameters(mdb: MongoDB):
197192
# After search CR is deployed, MongoDB controller will pick it up
@@ -216,6 +211,13 @@ def check_mongod_parameters():
216211

217212
run_periodically(check_mongod_parameters, timeout=200)
218213

214+
# After picking up MongoDBSearch CR, MongoDB reconciler will add mongod parameters.
215+
# But it will not immediately mark the MongoDB CR as Pending
216+
# spinning
217+
@mark.e2e_search_enterprise_tls
218+
def test_wait_for_database_resource_ready(mdb: MongoDB):
219+
mdb.assert_reaches_phase(Phase.Running, timeout=300)
220+
219221

220222
@mark.e2e_search_enterprise_tls
221223
def test_validate_tls_connections(mdb: MongoDB, mdbs: MongoDBSearch, namespace: str):
@@ -244,11 +246,6 @@ def test_search_assert_search_query(mdb: MongoDB):
244246
# after mongodb is upgraded, the role should be removed from AC
245247
# From 8.2 searchCoordinator role is a built-in role.
246248
class TestUpgradeMongod:
247-
def test_check_polyfilled_role_in_ac(self, mdb: MongoDB):
248-
custom_roles = mdb.get_automation_config_tester().automation_config.get("roles", [])
249-
assert len(custom_roles) > 0
250-
assert "searchCoordinator" in [role["role"] for role in custom_roles]
251-
252249
def test_mongod_version(self, mdb: MongoDB):
253250
# This test is redundant when looking at the context of the full test file,
254251
# as we deploy MDB_VERSION_WITHOUT_BUILT_IN_ROLE initially
@@ -258,6 +255,11 @@ def test_mongod_version(self, mdb: MongoDB):
258255
# or executed again when running locally.
259256
mdb.tester(ca_path=get_issuer_ca_filepath(), use_ssl=True).assert_version(MDB_VERSION_WITHOUT_BUILT_IN_ROLE)
260257

258+
def test_check_polyfilled_role_in_ac(self, mdb: MongoDB):
259+
custom_roles = mdb.get_automation_config_tester().automation_config.get("roles", [])
260+
assert len(custom_roles) > 0
261+
assert "searchCoordinator" in [role["role"] for role in custom_roles]
262+
261263
def test_upgrade_to_mongo_8_2(self, mdb: MongoDB):
262264
mdb.set_version(MDB_VERSION_WITH_BUILT_IN_ROLE)
263265
mdb.update()

0 commit comments

Comments
 (0)