mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 09:30:45 +00:00
Before fix of scylladb#20566, CQL was served irrespectively of default superuser password creation, which led to an incorrect product behavior and sporadic test failures. This test verifies race condition of serving CQL and creating default superuser password. Injected failure is used to ensure CQL use is attempted before default superuser password creation, however, the attempt is expected to fail because scylladb#20566 is fixed. Following that, the injected error is notified, so CQL driver can be started correctly. Finally, CREATE USER query is executed to confirm successful superuser authentication. This change: - Implement test_auth_password_ensured.py The test starts a server without expecting CQL serving, because expected_server_up_state=ServerUpState.HOST_ID_QUERIED and connect_driver=False. Error password_authenticator_start_pause is injected to block superuser password setup during server startup. Next, the test waits for a log to confirm that the code implementing injected error is reached. When the server startup procedure is unfinished, some operations might not complete on a first try, so waiting for driver connection is wrapped in repeat_if_host_unavailable.