Skip to content

Commit

Permalink
Merge branch 'dreyks-env-hooks'
Browse files Browse the repository at this point in the history
  • Loading branch information
toolmantim committed Apr 8, 2019
2 parents 67391c6 + a7ccab1 commit 4d081dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
File renamed without changes.
18 changes: 9 additions & 9 deletions tests/run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ load '/usr/local/lib/bats/load.bash'
stub docker \
"login -u AWS -p 1234 https://1234.dkr.ecr.us-east-1.amazonaws.com : echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "logging in to docker"
Expand All @@ -33,7 +33,7 @@ load '/usr/local/lib/bats/load.bash'
stub docker \
"login -u AWS -p 1234 https://1234.dkr.ecr.us-east-1.amazonaws.com : echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "logging in to docker"
Expand All @@ -51,7 +51,7 @@ load '/usr/local/lib/bats/load.bash'
stub aws \
"ecr get-login --no-include-email --registry-ids 1111 2222 : echo echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "logging in to docker"
Expand All @@ -67,7 +67,7 @@ load '/usr/local/lib/bats/load.bash'
"--version : echo aws-cli/1.11.40 Python/2.7.10 Darwin/16.6.0 botocore/1.5.80" \
"ecr get-login --registry-ids 1111 2222 3333 : echo echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "logging in to docker"
Expand All @@ -83,7 +83,7 @@ load '/usr/local/lib/bats/load.bash'
"--version : echo aws-cli/1.11.117 Python/2.7.10 Darwin/16.6.0 botocore/1.5.80" \
"ecr get-login --no-include-email --registry-ids 1111 2222 3333 : echo echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "logging in to docker"
Expand All @@ -102,7 +102,7 @@ load '/usr/local/lib/bats/load.bash'
stub docker \
"login -u AWS -p 1234 https://1234.dkr.ecr.ap-southeast-2.amazonaws.com : echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "logging in to docker"
Expand All @@ -123,7 +123,7 @@ load '/usr/local/lib/bats/load.bash'
stub docker \
"login -u AWS -p 1234 https://1234.dkr.ecr.ap-southeast-2.amazonaws.com : echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "logging in to docker"
Expand All @@ -141,7 +141,7 @@ load '/usr/local/lib/bats/load.bash'
"ecr get-login --no-include-email : exit 1" \
"ecr get-login --no-include-email : echo echo logging in to docker"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_success
assert_output --partial "Login failed on attempt 1 of 2. Trying again in 1 seconds.."
Expand All @@ -159,7 +159,7 @@ load '/usr/local/lib/bats/load.bash'
"ecr get-login --no-include-email : exit 1" \
"ecr get-login --no-include-email : exit 1"

run $PWD/hooks/pre-command
run $PWD/hooks/environment

assert_failure
assert_output --partial "Login failed on attempt 1 of 2. Trying again in 1 seconds..."
Expand Down

0 comments on commit 4d081dd

Please sign in to comment.