Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yihming committed Feb 19, 2025
1 parent 83d4be3 commit e8a0897
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion strato/tests/test_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_cp_dir_gcp(capsys):

def test_cp_file_local(capsys):
cp.main(["file1", "/bar/foo", "--dryrun"])
assert "cp file1 /bar/foo\n" == capsys.readouterr().out
assert "mkdir -p /bar\ncp file1 /bar/foo\n" == capsys.readouterr().out


def test_cp_dir_local(capsys):
Expand Down
12 changes: 6 additions & 6 deletions strato/tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@


def test_sync_aws(capsys):
sync.main(["file1", "s3://foo/bar/", "--dryrun"])
sync.main(["folder1", "s3://foo/bar/", "--dryrun"])
assert (
"aws s3 sync --delete --only-show-errors file1 s3://foo/bar/\n" == capsys.readouterr().out
"aws s3 sync --delete --only-show-errors folder1 s3://foo/bar/\n" == capsys.readouterr().out
)


def test_sync_gcp(capsys):
sync.main(["file1", "gs://foo/bar/", "--dryrun"])
sync.main(["folder1", "gs://foo/bar/", "--dryrun"])
assert (
gcloud + " rsync --delete-unmatched-destination-objects -r file1 gs://foo/bar/\n"
gcloud + " rsync --delete-unmatched-destination-objects -r folder1 gs://foo/bar/\n"
== capsys.readouterr().out
)


def test_sync_local(capsys):
sync.main(["file1", "/bar/foo", "--dryrun"])
assert "rsync -r --delete file1 /bar\n" == capsys.readouterr().out
sync.main(["folder1", "/bar/foo", "--dryrun"])
assert "rsync -r --delete folder1/ /bar/foo/\n" == capsys.readouterr().out

0 comments on commit e8a0897

Please sign in to comment.