fix more tests

This commit is contained in:
Sebastian Pfahl 2025-07-14 21:40:53 +02:00
commit 1439274e15
2 changed files with 8 additions and 4 deletions

View file

@ -16,6 +16,8 @@ class MockCursor:
self.executed_queries = []
def execute(self, query):
if self.status == "ERROR":
raise Exception("Mocked execution error")
self.executed_queries.append(query)
def fetchone(self):
@ -48,7 +50,7 @@ def test_uses_replica_terminology(f_output, c_output, c_ret_type):
(None, None, "START GROUP_REPLICATION "),
("repl_user", None, "START GROUP_REPLICATION USER='repl_user'"),
(None, "repl_pass", "START GROUP_REPLICATION PASSWORD='repl_pass'"),
("repl_user", "repl_pass", "START GROUP_REPLICATION USER='repl_user', PASSWORD='repl_pass'"),
("repl_user", "repl_pass", "START GROUP_REPLICATION USER='repl_user',PASSWORD='repl_pass'"),
]
)
def test_start_group_replication(user, password, expected_query):