mirror of
https://github.com/elgohr/Publish-Docker-Github-Action.git
synced 2026-03-12 18:07:12 -04:00
✅ Add test for more complex passwords
This commit is contained in:
19
test.bats
19
test.bats
@@ -591,6 +591,15 @@ teardown() {
|
||||
+ sanitize my/repository name"
|
||||
}
|
||||
|
||||
@test "it is ok with complexer passwords" {
|
||||
export GITHUB_REF='refs/heads/master'
|
||||
export INPUT_PASSWORD='9eL89n92G@!#o^$!&3Nz89F@%9'
|
||||
|
||||
run /entrypoint.sh
|
||||
|
||||
expectMockArgs '/usr/local/bin/docker 9eL89n92G@!#o^$!&3Nz89F@%9'
|
||||
}
|
||||
|
||||
expectStdOutContains() {
|
||||
local expected=$(echo "${1}" | tr -d '\n')
|
||||
local got=$(echo "${output}" | tr -d '\n')
|
||||
@@ -601,7 +610,15 @@ expectStdOutContains() {
|
||||
|
||||
expectMockCalled() {
|
||||
local expected=$(echo "${1}" | tr -d '\n')
|
||||
local got=$(cat mockCalledWith | tr -d '\n')
|
||||
local got=$(cat mockArgs | tr -d '\n')
|
||||
echo "Expected: |${expected}|
|
||||
Got: |${got}|"
|
||||
echo "${got}" | grep "${expected}"
|
||||
}
|
||||
|
||||
expectMockArgs() {
|
||||
local expected=$(echo "${1}" | tr -d '\n')
|
||||
local got=$(cat mockStdin | tr -d '\n')
|
||||
echo "Expected: |${expected}|
|
||||
Got: |${got}|"
|
||||
echo "${got}" | grep "${expected}"
|
||||
|
||||
Reference in New Issue
Block a user