Add authfile flag to pull and push
Push and pull can now access any cached registry credentials from the auth file Signed-off-by: umohnani8 <umohnani@redhat.com>
This commit is contained in:
parent
0914a7a667
commit
d855e2c8ad
13 changed files with 428 additions and 210 deletions
|
@ -76,3 +76,63 @@ function teardown() {
|
|||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "kpod pull from docker-archive" {
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alp.tar alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull docker-archive:alp.tar
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
rm -f alp.tar
|
||||
}
|
||||
|
||||
@test "kpod pull from oci-archive" {
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} save --format oci-archive -o oci-alp.tar alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull oci-archive:oci-alp.tar
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
rm -f oci-alp.tar
|
||||
}
|
||||
|
||||
@test "kpod pull from local directory" {
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run mkdir test_pull_dir
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} push alpine dir:test_pull_dir
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} rmi alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} pull dir:test_pull_dir
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} ${KPOD_OPTIONS} rmi test_pull_dir
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
rm -rf test_pull_dir
|
||||
}
|
||||
|
|
|
@ -49,17 +49,14 @@ function teardown() {
|
|||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "kpod push to oci without compression" {
|
||||
@test "kpod push to oci-archive without compression" {
|
||||
run ${KPOD_BINARY} $KPOD_OPTIONS pull "$IMAGE"
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run mkdir /tmp/oci-busybox
|
||||
run ${KPOD_BINARY} $KPOD_OPTIONS push "$IMAGE" oci-archive:/tmp/oci-busybox.tar:alpine
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
run ${KPOD_BINARY} $KPOD_OPTIONS push "$IMAGE" oci:/tmp/oci-busybox:busybox
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
rm -rf /tmp/oci-busybox
|
||||
rm -f /tmp/oci-busybox.tar
|
||||
run ${KPOD_BINARY} $KPOD_OPTIONS rmi "$IMAGE"
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue