-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from lilab-bcb/gcloud-storage
Replace gsutil by gcloud storage
- Loading branch information
Showing
11 changed files
with
70 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
gsutil = "gsutil -q -o GSUtil:parallel_composite_upload_threshold=150M" | ||
gcloud = "gcloud storage --no-user-output-enabled" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
from strato.commands import sync | ||
from strato.tests.helpers import gsutil | ||
from strato.tests.helpers import gcloud | ||
|
||
|
||
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"]) | ||
assert gsutil + " rsync -d -r file1 gs://foo/bar/\n" == capsys.readouterr().out | ||
sync.main(["folder1", "gs://foo/bar/", "--dryrun"]) | ||
assert ( | ||
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 |