-
Notifications
You must be signed in to change notification settings - Fork 758
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 #1608 from rhatdan/dry-run
Add dry-run mode to skopeo-sync
- Loading branch information
Showing
4 changed files
with
60 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bats | ||
# | ||
# Sync tests | ||
# | ||
|
||
load helpers | ||
|
||
function setup() { | ||
standard_setup | ||
} | ||
|
||
@test "sync: --dry-run" { | ||
local remote_image=quay.io/libpod/busybox:latest | ||
local dir=$TESTDIR/dir | ||
|
||
run_skopeo sync --dry-run --src docker --dest dir --scoped $remote_image $dir | ||
expect_output --substring "Would have copied image" | ||
expect_output --substring "from=\"docker://${remote_image}\" to=\"dir:${dir}/${remote_image}\"" | ||
expect_output --substring "Would have synced 1 images from 1 sources" | ||
} | ||
|
||
teardown() { | ||
standard_teardown | ||
} | ||
|
||
# vim: filetype=sh |