From df1a5eef1ddba9f838a479e1f1b83c07b3a9bc58 Mon Sep 17 00:00:00 2001 From: vsedmik Date: Thu, 30 Sep 2021 10:07:18 +0200 Subject: [PATCH 1/2] fix expected files for backup --- tests/test_backup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_backup.py b/tests/test_backup.py index fb5b8a9..b86fae8 100644 --- a/tests/test_backup.py +++ b/tests/test_backup.py @@ -13,8 +13,6 @@ "config_files.tar.gz", ".config.snar", "metadata.yml", - "mongo_data.tar.gz", - ".mongo.snar", ] OFFLINE_SAT_FILES = [ @@ -28,7 +26,7 @@ "config_files.tar.gz", ".config.snar", "metadata.yml", - "mongo_dump", + "pulpcore.dump", ] ONLINE_SAT_FILES = [ From f78ef173ae2980d92a82c7ad3939b479be327114 Mon Sep 17 00:00:00 2001 From: vsedmik Date: Thu, 30 Sep 2021 21:45:40 +0200 Subject: [PATCH 2/2] unified offline files for SAT and CAPS --- tests/test_backup.py | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/tests/test_backup.py b/tests/test_backup.py index b86fae8..9e21a03 100644 --- a/tests/test_backup.py +++ b/tests/test_backup.py @@ -9,19 +9,15 @@ NODIR_MSG = "ERROR: parameter 'BACKUP_DIR': no value provided" NOPREV_MSG = "ERROR: option '--incremental': Previous backup " "directory does not exist" -OFFLINE_CAPS_FILES = [ + +OFFLINE_BACKUP_FILES = [ "config_files.tar.gz", ".config.snar", "metadata.yml", -] - -OFFLINE_SAT_FILES = [ "pgsql_data.tar.gz", ".postgres.snar", ] -OFFLINE_BACKUP_FILES = OFFLINE_CAPS_FILES + OFFLINE_SAT_FILES - ONLINE_CAPS_FILES = [ "config_files.tar.gz", ".config.snar", @@ -349,9 +345,6 @@ def test_positive_backup_offline(setup_backup_tests, ansible_module): files_list = contacted.values()[0]["stdout_lines"] expected_files = OFFLINE_BACKUP_FILES - # capsule-specific file list - if server() == "capsule": - expected_files = OFFLINE_CAPS_FILES assert set(files_list).issuperset(expected_files + CONTENT_FILES), assert_msg @@ -387,9 +380,6 @@ def test_positive_backup_offline_skip_pulp_content(setup_backup_tests, ansible_m files_list = contacted.values()[0]["stdout_lines"] expected_files = OFFLINE_BACKUP_FILES - # capsule-specific file list - if server() == "capsule": - expected_files = OFFLINE_CAPS_FILES assert set(files_list).issuperset(expected_files), assert_msg assert CONTENT_FILES not in files_list, "content not skipped" @@ -427,9 +417,6 @@ def test_positive_backup_offline_preserve_directory(setup_backup_tests, ansible_ files_list = contacted.values()[0]["stdout_lines"] expected_files = OFFLINE_BACKUP_FILES - # capsule-specific file list - if server() == "capsule": - expected_files = OFFLINE_CAPS_FILES assert set(files_list).issuperset(expected_files + CONTENT_FILES), assert_msg @@ -465,9 +452,6 @@ def test_positive_backup_offline_split_pulp_tar(setup_backup_tests, ansible_modu files_list = contacted.values()[0]["stdout_lines"] expected_files = OFFLINE_BACKUP_FILES - # capsule-specific file list - if server() == "capsule": - expected_files = OFFLINE_CAPS_FILES assert set(files_list).issuperset(expected_files + CONTENT_FILES), assert_msg @@ -547,9 +531,6 @@ def test_positive_backup_offline_capsule_features(setup_backup_tests, ansible_mo files_list = contacted.values()[0]["stdout_lines"] expected_files = OFFLINE_BACKUP_FILES - # capsule-specific file list - if server() == "capsule": - expected_files = OFFLINE_CAPS_FILES assert set(files_list).issuperset(expected_files + CONTENT_FILES), assert_msg @@ -586,7 +567,7 @@ def test_positive_backup_offline_logical(setup_backup_tests, ansible_module): # capsule-specific file list if server() == "capsule": - expected_files = OFFLINE_CAPS_FILES + ONLINE_CAPS_FILES + expected_files = OFFLINE_BACKUP_FILES + ONLINE_CAPS_FILES assert set(files_list).issuperset(expected_files + CONTENT_FILES), assert_msg