Skip to content

Commit

Permalink
Fix tests so they do not create local directories
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaily committed Jan 23, 2024
1 parent cb531ad commit e82ae0d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/functional/s3/test_sync_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,17 @@ class TestSyncCommandWithS3Express(BaseS3TransferCommandTest):
prefix = 's3 sync '

def test_incompatible_with_sync_upload(self):
cmdline = '%s localdirectory/ s3://testdirectorybucket--usw2-az1--x-s3/' % self.prefix
cmdline = '%s %s s3://testdirectorybucket--usw2-az1--x-s3/' % (self.prefix, self.files.rootdir)

stderr = self.run_cmd(cmdline, expected_rc=255)[1]
self.assertIn('Cannot use sync command with a directory bucket.', stderr)

def test_incompatible_with_sync_download(self):
cmdline = '%s s3://testdirectorybucket--usw2-az1--x-s3/ localdirectory/' % self.prefix
stderr = self.run_cmd(cmdline, expected_rc=255)[1]
cmdline = '%s s3://testdirectorybucket--usw2-az1--x-s3/ %s' % (self.prefix, self.files.rootdir)

with cd(self.files.rootdir):
stderr = self.run_cmd(cmdline, expected_rc=255)[1]

self.assertIn('Cannot use sync command with a directory bucket.', stderr)

def test_incompatible_with_sync_copy(self):
Expand Down

0 comments on commit e82ae0d

Please sign in to comment.