@@ -187,11 +187,6 @@ def test_create_search_resource(mdbs: MongoDBSearch):
187
187
mdbs .assert_reaches_phase (Phase .Running , timeout = 300 )
188
188
189
189
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
-
195
190
@mark .e2e_search_enterprise_tls
196
191
def test_wait_for_mongod_parameters (mdb : MongoDB ):
197
192
# After search CR is deployed, MongoDB controller will pick it up
@@ -216,6 +211,13 @@ def check_mongod_parameters():
216
211
217
212
run_periodically (check_mongod_parameters , timeout = 200 )
218
213
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
+
219
221
220
222
@mark .e2e_search_enterprise_tls
221
223
def test_validate_tls_connections (mdb : MongoDB , mdbs : MongoDBSearch , namespace : str ):
@@ -244,11 +246,6 @@ def test_search_assert_search_query(mdb: MongoDB):
244
246
# after mongodb is upgraded, the role should be removed from AC
245
247
# From 8.2 searchCoordinator role is a built-in role.
246
248
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
-
252
249
def test_mongod_version (self , mdb : MongoDB ):
253
250
# This test is redundant when looking at the context of the full test file,
254
251
# as we deploy MDB_VERSION_WITHOUT_BUILT_IN_ROLE initially
@@ -258,6 +255,11 @@ def test_mongod_version(self, mdb: MongoDB):
258
255
# or executed again when running locally.
259
256
mdb .tester (ca_path = get_issuer_ca_filepath (), use_ssl = True ).assert_version (MDB_VERSION_WITHOUT_BUILT_IN_ROLE )
260
257
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
+
261
263
def test_upgrade_to_mongo_8_2 (self , mdb : MongoDB ):
262
264
mdb .set_version (MDB_VERSION_WITH_BUILT_IN_ROLE )
263
265
mdb .update ()
0 commit comments