@@ -16,6 +16,8 @@ def __init__(self, status="ONLINE"):
1616 self .executed_queries = []
1717
1818 def execute (self , query ):
19+ if self .status == "ERROR" :
20+ raise Exception ("Mocked execution error" )
1921 self .executed_queries .append (query )
2022
2123 def fetchone (self ):
@@ -44,7 +46,7 @@ def test_uses_replica_terminology(f_output, c_output, c_ret_type):
4446 (None , None , "START GROUP_REPLICATION " ),
4547 ("repl_user" , None , "START GROUP_REPLICATION USER='repl_user'" ),
4648 (None , "repl_pass" , "START GROUP_REPLICATION PASSWORD='repl_pass'" ),
47- ("repl_user" , "repl_pass" , "START GROUP_REPLICATION USER='repl_user', PASSWORD='repl_pass'" ),
49+ ("repl_user" , "repl_pass" , "START GROUP_REPLICATION USER='repl_user',PASSWORD='repl_pass'" ),
4850 ]
4951)
5052def test_start_group_replication (user , password , expected_query ):
@@ -58,9 +60,9 @@ def test_start_group_replication(user, password, expected_query):
5860
5961 chm = []
6062 if user :
61- chm .append (" USER='%s'" % user )
63+ chm .append ("USER='%s'" % user )
6264 if password :
63- chm .append (" PASSWORD='%s'" % password )
65+ chm .append ("PASSWORD='%s'" % password )
6466
6567 result = startgroupreplication (module , cursor , chm , False )
6668
0 commit comments