2222from mysql_ch_replicator .runner import ProcessRunner
2323
2424
25- CONFIG_FILE = 'tests_config.yaml'
26- CONFIG_FILE_MARIADB = 'tests_config_mariadb.yaml'
25+ CONFIG_FILE = 'tests/ tests_config.yaml'
26+ CONFIG_FILE_MARIADB = 'tests/ tests_config_mariadb.yaml'
2727TEST_DB_NAME = 'replication-test_db'
2828TEST_DB_NAME_2 = 'replication-test_db_2'
2929TEST_DB_NAME_2_DESTINATION = 'replication-destination'
@@ -323,7 +323,7 @@ def get_db_replicator_pid(cfg: config.Settings, db_name: str):
323323 return state .pid
324324
325325
326- @pytest .mark .parametrize ('cfg_file' , [CONFIG_FILE , 'tests_config_parallel.yaml' ])
326+ @pytest .mark .parametrize ('cfg_file' , [CONFIG_FILE , 'tests/ tests_config_parallel.yaml' ])
327327def test_runner (cfg_file ):
328328 cfg = config .Settings ()
329329 cfg .load (cfg_file )
@@ -587,7 +587,7 @@ def test_parallel_initial_replication_record_versions():
587587 after parallel initial replication.
588588 """
589589 # Only run this test with parallel configuration
590- cfg_file = 'tests_config_parallel.yaml'
590+ cfg_file = 'tests/ tests_config_parallel.yaml'
591591 cfg = config .Settings ()
592592 cfg .load (cfg_file )
593593
@@ -706,7 +706,7 @@ def test_parallel_initial_replication_record_versions():
706706
707707def test_database_tables_filtering ():
708708 cfg = config .Settings ()
709- cfg .load ('tests_config_databases_tables.yaml' )
709+ cfg .load ('tests/ tests_config_databases_tables.yaml' )
710710
711711 mysql = mysql_api .MySQLApi (
712712 database = None ,
@@ -777,7 +777,7 @@ def test_database_tables_filtering():
777777 mysql .execute (f"INSERT INTO test_table_3 (name, age) VALUES ('Ivan', 42);" , commit = True )
778778 mysql .execute (f"INSERT INTO test_table_2 (name, age) VALUES ('Ivan', 42);" , commit = True )
779779
780- run_all_runner = RunAllRunner (cfg_file = 'tests_config_databases_tables.yaml' )
780+ run_all_runner = RunAllRunner (cfg_file = 'tests/ tests_config_databases_tables.yaml' )
781781 run_all_runner .run ()
782782
783783 assert_wait (lambda : 'test_db_2' in ch .get_databases ())
@@ -1180,7 +1180,7 @@ def test_json():
11801180
11811181def test_string_primary_key (monkeypatch ):
11821182 cfg = config .Settings ()
1183- cfg .load ('tests_config_string_primary_key.yaml' )
1183+ cfg .load ('tests/ tests_config_string_primary_key.yaml' )
11841184
11851185 mysql = mysql_api .MySQLApi (
11861186 database = None ,
@@ -1215,9 +1215,9 @@ def test_string_primary_key(monkeypatch):
12151215 commit = True ,
12161216 )
12171217
1218- binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests_config_string_primary_key.yaml' )
1218+ binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
12191219 binlog_replicator_runner .run ()
1220- db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests_config_string_primary_key.yaml' )
1220+ db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
12211221 db_replicator_runner .run ()
12221222
12231223 assert_wait (lambda : TEST_DB_NAME in ch .get_databases ())
@@ -1240,7 +1240,7 @@ def test_string_primary_key(monkeypatch):
12401240
12411241def test_if_exists_if_not_exists (monkeypatch ):
12421242 cfg = config .Settings ()
1243- cfg .load ('tests_config_string_primary_key.yaml' )
1243+ cfg .load ('tests/ tests_config_string_primary_key.yaml' )
12441244
12451245 mysql = mysql_api .MySQLApi (
12461246 database = None ,
@@ -1254,9 +1254,9 @@ def test_if_exists_if_not_exists(monkeypatch):
12541254
12551255 prepare_env (cfg , mysql , ch )
12561256
1257- binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests_config_string_primary_key.yaml' )
1257+ binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
12581258 binlog_replicator_runner .run ()
1259- db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests_config_string_primary_key.yaml' )
1259+ db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
12601260 db_replicator_runner .run ()
12611261
12621262 assert_wait (lambda : TEST_DB_NAME in ch .get_databases ())
@@ -1279,7 +1279,7 @@ def test_if_exists_if_not_exists(monkeypatch):
12791279
12801280def test_percona_migration (monkeypatch ):
12811281 cfg = config .Settings ()
1282- cfg .load ('tests_config_string_primary_key.yaml' )
1282+ cfg .load ('tests/ tests_config_string_primary_key.yaml' )
12831283
12841284 mysql = mysql_api .MySQLApi (
12851285 database = None ,
@@ -1304,9 +1304,9 @@ def test_percona_migration(monkeypatch):
13041304 commit = True ,
13051305 )
13061306
1307- binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests_config_string_primary_key.yaml' )
1307+ binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
13081308 binlog_replicator_runner .run ()
1309- db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests_config_string_primary_key.yaml' )
1309+ db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
13101310 db_replicator_runner .run ()
13111311
13121312 assert_wait (lambda : TEST_DB_NAME in ch .get_databases ())
@@ -1355,7 +1355,7 @@ def test_percona_migration(monkeypatch):
13551355
13561356def test_add_column_first_after_and_drop_column (monkeypatch ):
13571357 cfg = config .Settings ()
1358- cfg .load ('tests_config_string_primary_key.yaml' )
1358+ cfg .load ('tests/ tests_config_string_primary_key.yaml' )
13591359
13601360 mysql = mysql_api .MySQLApi (
13611361 database = None ,
@@ -1380,9 +1380,9 @@ def test_add_column_first_after_and_drop_column(monkeypatch):
13801380 commit = True ,
13811381 )
13821382
1383- binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests_config_string_primary_key.yaml' )
1383+ binlog_replicator_runner = BinlogReplicatorRunner (cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
13841384 binlog_replicator_runner .run ()
1385- db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests_config_string_primary_key.yaml' )
1385+ db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , cfg_file = 'tests/ tests_config_string_primary_key.yaml' )
13861386 db_replicator_runner .run ()
13871387
13881388 assert_wait (lambda : TEST_DB_NAME in ch .get_databases ())
@@ -1506,7 +1506,7 @@ def get_last_insert_from_binlog(cfg: config.Settings, db_name: str):
15061506
15071507@pytest .mark .optional
15081508def test_performance_realtime_replication ():
1509- config_file = 'tests_config_perf.yaml'
1509+ config_file = 'tests/ tests_config_perf.yaml'
15101510 num_records = 100000
15111511
15121512 cfg = config .Settings ()
@@ -2196,7 +2196,7 @@ def test_year_type():
21962196
21972197@pytest .mark .optional
21982198def test_performance_initial_only_replication ():
2199- config_file = 'tests_config_perf.yaml'
2199+ config_file = 'tests/ tests_config_perf.yaml'
22002200 num_records = 300000
22012201
22022202 cfg = config .Settings ()
@@ -2281,7 +2281,7 @@ def test_performance_initial_only_replication():
22812281 t1 = time .time ()
22822282
22832283 # Create a custom config file for testing with parallel replication
2284- parallel_config_file = 'tests_config_perf_parallel.yaml'
2284+ parallel_config_file = 'tests/ tests_config_perf_parallel.yaml'
22852285 if os .path .exists (parallel_config_file ):
22862286 os .remove (parallel_config_file )
22872287
@@ -2329,7 +2329,7 @@ def test_performance_initial_only_replication():
23292329def test_schema_evolution_with_db_mapping ():
23302330 """Test case to reproduce issue where schema evolution doesn't work with database mapping."""
23312331 # Use the predefined config file with database mapping
2332- config_file = "tests_config_db_mapping.yaml"
2332+ config_file = "tests/ tests_config_db_mapping.yaml"
23332333
23342334 cfg = config .Settings ()
23352335 cfg .load (config_file )
@@ -2430,7 +2430,7 @@ def test_dynamic_column_addition_user_config():
24302430 This test reproduces the issue where columns are added on-the-fly via UPDATE
24312431 rather than through ALTER TABLE statements, leading to an index error in the converter.
24322432 """
2433- config_path = 'tests_config_dynamic_column.yaml'
2433+ config_path = 'tests/ tests_config_dynamic_column.yaml'
24342434
24352435 cfg = config .Settings ()
24362436 cfg .load (config_path )
0 commit comments