Skip to content

Commit 10024bd

Browse files
committed
updated test_docker_registry_show_tags.sh
1 parent c211894 commit 10024bd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_docker_registry_show_tags.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ srcdir2="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1919

2020
cd "$srcdir2/.."
2121

22+
# shellcheck disable=SC1091
2223
. "tests/utils.sh"
2324

25+
# shellcheck disable=SC1091
2426
. "bash-tools/lib/utils.sh"
2527

2628
srcdir="$srcdir2"
@@ -75,12 +77,13 @@ private_key="registry.key"
7577
certificate="registry.crt"
7678
htpasswd="registry.htpasswd"
7779
csr="registry.csr"
78-
if ! [ -f "$private_key" -a -f "$certificate" ]; then
80+
if ! [ -f "$private_key" ] &&
81+
[ -f "$certificate" ]; then
7982
echo "Generating sample SSL certificates:"
8083
echo
8184
openssl genrsa -out "$private_key" 2048
8285
echo
83-
yes "" | openssl req -new -key "$private_key" -out "$csr" || :
86+
yes "." | openssl req -new -key "$private_key" -out "$csr" || :
8487
echo
8588
openssl x509 -req -days 3650 -in "$csr" -signkey "$private_key" -out "$certificate"
8689
echo
@@ -108,6 +111,7 @@ echo "getting dynamic Docker Registry port mapping:"
108111
docker_compose_port "Docker Registry"
109112
hr
110113

114+
# shellcheck disable=SC2153
111115
if [ -z "$DOCKER_REGISTRY_PORT" ]; then
112116
echo "DOCKER_REGISTRY_PORT not found from running container, did container fail to start up properly?"
113117
exit 1

0 commit comments

Comments
 (0)