Skip to content

Commit bdefeda

Browse files
committed
checkf or ac change instead
1 parent 40124cf commit bdefeda

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

docker/mongodb-kubernetes-tests/tests/authentication/replica_set_scram_sha_256_connectivity.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,22 @@ def test_user_cannot_authenticate_with_incorrect_password(self, replica_set: Mon
132132

133133
@mark.e2e_replica_set_scram_sha_256_user_connectivity
134134
class TestCanChangePassword(KubernetesTester):
135-
def test_user_can_authenticate_with_new_password(
136-
self, scram_user: MongoDBUser, namespace: str, replica_set: MongoDB
137-
):
135+
def test_user_can_authenticate_with_new_password(self, namespace: str, replica_set: MongoDB):
136+
initial_tester = replica_set.get_automation_config_tester()
137+
initial_version = initial_tester.automation_config.get("version", 0)
138+
138139
new_password = "my-new-password7"
139140
update_secret(namespace, PASSWORD_SECRET_NAME, {"password": new_password})
140-
scram_user.assert_reaches_phase(Phase.Updated)
141+
142+
def ac_updated() -> bool:
143+
try:
144+
tester = replica_set.get_automation_config_tester()
145+
current_version = tester.automation_config.get("version", 0)
146+
return current_version > initial_version
147+
except Exception:
148+
return False
149+
150+
wait_until(ac_updated, timeout=600)
141151

142152
replica_set.tester().assert_scram_sha_authentication(
143153
password=new_password,

0 commit comments

Comments
 (0)