From 00444fc85e5b3776cf113ce099ece759aa2b8997 Mon Sep 17 00:00:00 2001 From: Amir Mofakhar Date: Thu, 18 Jul 2024 16:52:45 +0100 Subject: [PATCH] debug 3 --- .../test_resync_mariadb_to_sf_table_size_check.py | 9 ++++++--- .../test_resync_pg_to_sf_table_size_check.py | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/end_to_end/target_snowflake/tap_mariadb/test_resync_mariadb_to_sf_table_size_check.py b/tests/end_to_end/target_snowflake/tap_mariadb/test_resync_mariadb_to_sf_table_size_check.py index 6bde4cf1d..9319db19a 100644 --- a/tests/end_to_end/target_snowflake/tap_mariadb/test_resync_mariadb_to_sf_table_size_check.py +++ b/tests/end_to_end/target_snowflake/tap_mariadb/test_resync_mariadb_to_sf_table_size_check.py @@ -14,7 +14,10 @@ def _create_ppw_config_file(table_mb): config_file.write('allowed_resync_max_size:\n') config_file.write(f' table_mb: {table_mb}\n') - tasks.run_command(f'pipelinewise import_config --dir {TEST_PROJECTS_DIR_PATH}') + [return_code, stdout, stderr] = tasks.run_command(f'pipelinewise import_config --dir {TEST_PROJECTS_DIR_PATH}') + print(stdout) + print(stderr) + assert return_code == 0 class TestResyncMariaDBToSF(TapMariaDB): @@ -41,8 +44,8 @@ def test_resync_mariadb_to_sf_if_table_size_greater_than_limit(self): # pylint: with open(f'{CONFIG_DIR}/config.json', 'r', encoding='utf-8') as config_file: aa = config_file.readlines() - for ii in aa: - print(ii) + for line in aa: + print(line) assert return_code == 1 diff --git a/tests/end_to_end/target_snowflake/tap_postgres/test_resync_pg_to_sf_table_size_check.py b/tests/end_to_end/target_snowflake/tap_postgres/test_resync_pg_to_sf_table_size_check.py index dedb4f88c..0d184ede8 100644 --- a/tests/end_to_end/target_snowflake/tap_postgres/test_resync_pg_to_sf_table_size_check.py +++ b/tests/end_to_end/target_snowflake/tap_postgres/test_resync_pg_to_sf_table_size_check.py @@ -14,7 +14,10 @@ def _create_ppw_config_file(table_mb): config_file.write('allowed_resync_max_size:\n') config_file.write(f' table_mb: {table_mb}\n') - tasks.run_command(f'pipelinewise import_config --dir {TEST_PROJECTS_DIR_PATH}') + [return_code, stdout, stderr] = tasks.run_command(f'pipelinewise import_config --dir {TEST_PROJECTS_DIR_PATH}') + print(stdout) + print(stderr) + assert return_code == 0 class TestResyncPGToSF(TapPostgres): @@ -40,8 +43,8 @@ def test_resync_pg_to_sf_if_table_size_greater_than_limit(self): # pylint: dis [return_code, _, _] = tasks.run_command(command) with open(f'{CONFIG_DIR}/config.json', 'r', encoding='utf-8') as config_file: aa = config_file.readlines() - for ii in aa: - print(ii) + for line in aa: + print(line) assert return_code == 1