Remove protocol from custom registry for setting in the name and checking in the name

This commit is contained in:
Lars Gohr
2019-10-10 22:02:23 +02:00
parent 1133a364e4
commit cade1bc239
2 changed files with 20 additions and 3 deletions

View File

@@ -227,6 +227,22 @@ Called /usr/local/bin/docker logout"
[ "$output" = "$expected" ]
}
@test "it pushes to another registry and removes the protocol from the reference" {
export INPUT_REGISTRY='https://my.Registry.io'
export INPUT_NAME='my/repository'
run /entrypoint.sh
local expected="
Called /usr/local/bin/docker login -u USERNAME --password-stdin https://my.Registry.io
Called /usr/local/bin/docker build -t my.Registry.io/my/repository:latest .
Called /usr/local/bin/docker push my.Registry.io/my/repository:latest
::set-output name=tag::latest
Called /usr/local/bin/docker logout"
echo $output
[ "$output" = "$expected" ]
}
@test "it caches the image from a former build" {
export INPUT_CACHE='true'