Changeset 40897 for branches/ipp-132_automate_jira_conf_backups/backups
- Timestamp:
- Oct 3, 2019, 11:51:21 AM (7 years ago)
- Location:
- branches/ipp-132_automate_jira_conf_backups/backups
- Files:
-
- 1 deleted
- 3 edited
-
backup_atlassian_applications.py (modified) (3 diffs)
-
backup_atlassian_applications_test.py (modified) (2 diffs)
-
full_atlassian_backup_test.py (modified) (2 diffs)
-
utils (deleted)
Legend:
- Unmodified
- Added
- Removed
-
branches/ipp-132_automate_jira_conf_backups/backups/backup_atlassian_applications.py
r40896 r40897 13 13 # a restructure would be needed 14 14 # Ideally, the utils should be added to the path. 15 import utils.subprocess_utils as sub_utils16 17 18 DEFAULT_CONFIG_FILE = path. abspath('./atlassian_backups.config')15 import subprocess_utils as sub_utils 16 17 18 DEFAULT_CONFIG_FILE = path.join(path.dirname(__file__), 'atlassian_backups.config') 19 19 20 20 … … 236 236 jira_tar_name = datetime.date.today().strftime("%Y_%m_%d") + "_jira_attachments.tar" 237 237 jira_tar_filepath = path.join(latest_paths[0], jira_tar_name) 238 jira_tar_args = ["- cf", jira_tar_filepath, self.jira_attachments_path]238 jira_tar_args = ["-C", "/", "-cf", jira_tar_filepath, self.jira_attachments_path.strip('/')] 239 239 sub_utils.tar_wrapper(jira_tar_args) 240 240 sub_utils.chmod_wrapper(['774', jira_tar_filepath]) … … 246 246 confluence_tar_name = datetime.date.today().strftime("%Y_%m_%d") + "_confluence_attachments.tar" 247 247 confluence_tar_filepath = path.join(latest_paths[0], confluence_tar_name) 248 confluence_tar_args = ["- cf", confluence_tar_filepath, self.conf_attachments_path]248 confluence_tar_args = ["-C", "/", "-cf", confluence_tar_filepath, self.conf_attachments_path.strip('/')] 249 249 sub_utils.tar_wrapper(confluence_tar_args) 250 250 sub_utils.chmod_wrapper(['774', confluence_tar_filepath]) -
branches/ipp-132_automate_jira_conf_backups/backups/backup_atlassian_applications_test.py
r40894 r40897 8 8 9 9 import full_atlassian_backup_test as fab_test 10 import utils.subprocess_utils as sub_utils10 import subprocess_utils as sub_utils 11 11 12 12 from backup_atlassian_applications import AtlassianBackups 13 13 14 TEST_DEFAULT_CONFIG_FILE = "./testing/test.config"14 TEST_DEFAULT_CONFIG_FILE = os.path.join(os.path.dirname(__file__), './testing/test.config') 15 15 16 16 … … 47 47 48 48 def test_default_config_loads_with_no_args(self): 49 assert os.path.exists("./atlassian_backups.config") 49 default_config = baa.DEFAULT_CONFIG_FILE 50 assert os.path.exists(default_config) 50 51 ab = AtlassianBackups() 51 52 assert ab.host_backup_path == "/export/ippops4.0/atlassian_backups" -
branches/ipp-132_automate_jira_conf_backups/backups/full_atlassian_backup_test.py
r40893 r40897 6 6 7 7 from backup_atlassian_applications import AtlassianBackups 8 9 TEST_DEFAULT_CONFIG_FILE = "./testing/test.config"10 11 8 12 9 def create_all_paths_and_folders(ab_class: AtlassianBackups, tmpdir) -> AtlassianBackups: … … 140 137 141 138 def test_entire_process(self, tmpdir): 142 ab = AtlassianBackups(config_file=TEST_DEFAULT_CONFIG_FILE) 139 test_config_file = os.path.join(os.path.dirname(__file__), 'testing', 'test.config') 140 141 ab = AtlassianBackups(config_file=test_config_file) 143 142 ab = create_all_paths_and_folders(ab, tmpdir) 144 143
Note:
See TracChangeset
for help on using the changeset viewer.
