Changeset 41065
- Timestamp:
- Nov 5, 2019, 1:41:25 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ipp-350_add_to_jira_conf_backups/confluence_backup_test.py
r41061 r41065 38 38 { 'sources' : (f"{os.path.join(tmpdir, 'rsync_source_dir1')}," 39 39 f"{os.path.join(tmpdir, 'rsync_source_dir2')}") 40 , 'additional_args' : '-a --delete-after '40 , 'additional_args' : '-a --delete-after --exclude exclude_me_if_you_like' 41 41 , 'sub-dirs' : 'conf_subdir1, conf_subdir2' 42 42 } … … 93 93 file_in_rsync_dir1 = os.path.join(rsync_source_dir1, "some_file_to_rsync") 94 94 file_in_rsync_dir2 = os.path.join(rsync_source_dir2, "some_other_file_to_rsync") 95 exluded_file = os.path.join(rsync_source_dir1, "exclude_me_if_you_like") 95 96 os.makedirs(rsync_source_dir1) 96 97 os.makedirs(rsync_source_dir2) 97 98 Path(file_in_rsync_dir1).touch() 98 99 Path(file_in_rsync_dir2).touch() 100 Path(exluded_file).touch() 99 101 assert os.path.exists(file_in_rsync_dir1) 100 102 assert os.path.exists(file_in_rsync_dir2) 103 assert os.path.exists(exluded_file) 101 104 102 105 … … 342 345 assert not os.path.exists(expected_file_bak1_dir2) 343 346 assert not os.path.exists(expected_file_bak2_dir2) 347 an_excluded_file = os.path.join(expected_confluence_host_rsync1, "exclude_me_if_you_like") 348 assert not os.path.exists(an_excluded_file) 344 349 345 350 rsync_result = cb._run_rsync() … … 359 364 assert os.path.exists(expected_file_bak1_dir2) 360 365 assert os.path.exists(expected_file_bak2_dir2) 366 assert not os.path.exists(an_excluded_file)
Note:
See TracChangeset
for help on using the changeset viewer.
