Skip to content

Commit

Permalink
squash. update comments, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Mar 16, 2024
1 parent 42bbeac commit 8b7b2ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scripts/irods/test/test_iput.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,17 +833,17 @@ def test_iput_ignore_symlinks_option_is_an_alias_of_the_link_option__issue_7537(
os.symlink(test_file, symlink_file)
self.assertTrue(os.path.exists(symlink_file))

# Try to upload the symlinked file into iRODS.
# Try to upload the symlink file into iRODS.
self.user.assert_icommand(['iput', '--ignore-symlinks', symlink_file])

# Show no data object exists, proving the symlinked file was ignored.
# Show no data object exists, proving the symlink file was ignored.
logical_path = f'{self.user.session_collection}/{test_file_basename}'
self.assertFalse(lib.replica_exists(self.user, logical_path, 0))

# Try again using the recursive flag and the parent directory.
self.user.assert_icommand(['iput', '--ignore-symlinks', '-r', self.user.local_session_dir])

# Show no data object exists, proving the symlinked file was ignored.
# Show no data object exists, proving the symlink file was ignored.
logical_path = f'{self.user.session_collection}/{test_file_basename}'
self.assertFalse(lib.replica_exists(self.user, logical_path, 0))

Expand Down
6 changes: 3 additions & 3 deletions scripts/irods/test/test_irsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,16 +652,16 @@ def test_irsync_ignore_symlinks_option_is_an_alias_of_the_link_option__issue_753
test_file_basename = 'irsync_issue_7537.txt'
test_file = f'{self.user0.local_session_dir}/{test_file_basename}'
with open(test_file, 'w') as f:
f.write('This file will be ignored by iput due to the symlink.')
f.write('This file will be ignored by irsync due to the symlink.')

# Create a symlink to the file.
symlink_file = f'{self.user0.local_session_dir}/{test_file_basename}.symlink'
os.symlink(test_file, symlink_file)
self.assertTrue(os.path.exists(symlink_file))

# Try to sync the symlinked file into iRODS.
# Try to upload the symlink file into iRODS.
logical_path = f'{self.user0.session_collection}/{test_file_basename}'
self.user0.assert_icommand(['irsync', '--ignore-symlinks', symlink_file, f'i:{logical_path}'])

# Show no data object exists, proving the symlinked file was ignored.
# Show no data object exists, proving the symlink file was ignored.
self.assertFalse(lib.replica_exists(self.user0, logical_path, 0))

0 comments on commit 8b7b2ee

Please sign in to comment.