Skip to content

Commit dfc46bc

Browse files
committed
update tests/test_docker_registry_show_tags.sh
1 parent b6222ef commit dfc46bc

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

tests/test_docker_registry_show_tags.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,35 @@ if ! [ -f "$private_key" -a -f "$certificate" ]; then
8484
echo
8585
openssl x509 -req -days 3650 -in "$csr" -signkey "$private_key" -out "$certificate"
8686
echo
87+
hr
8788
fi
8889
#if ! [ -f "$htpasswd" ]; then
89-
echo "generating htpasswd auth file"
90+
echo "generating htpasswd auth file:"
9091
# -B - becrypt - docker registry ignores entries that don't use very secure Becrypt
9192
# -b - take password from cli instead of prompting
9293
# -c - create htpasswd file
9394
htpasswd -B -b -c "$htpasswd" "$DOCKER_REGISTRY_USER" "$DOCKER_REGISTRY_PASSWORD"
9495
echo
96+
hr
9597
#fi
9698
cd "$srcdir/.."
9799

98100
echo "Bringing up Docker Registry container:"
99101
echo
100102
#docker run -d --name "$name" -p 5000:5000 registry:2
101103
docker-compose up -d
104+
hr
102105
echo
103106

104107
echo "getting dynamic Docker Registry port mapping:"
105108
docker_compose_port "Docker Registry"
109+
hr
106110

107111
if [ -z "$DOCKER_REGISTRY_PORT" ]; then
108112
echo "DOCKER_REGISTRY_PORT not found from running container, did container fail to start up properly?"
109113
exit 1
110114
fi
111115

112-
hr
113116
when_ports_available "$max_secs" "$DOCKER_REGISTRY_HOST" "$DOCKER_REGISTRY_PORT"
114117
hr
115118
when_url_content "$max_secs" "https://$DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT/v2/_catalog" repositories -u "$DOCKER_REGISTRY_USER":"$DOCKER_REGISTRY_PASSWORD"
@@ -118,10 +121,11 @@ echo
118121

119122
echo "docker login to registry $DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT ..."
120123
docker login -e root@localhost -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" "$DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT"
124+
hr
121125

122-
tag="0.7"
123-
repo1="library/alpine"
124-
repo2="harisekhon/consul:$tag"
126+
tag="3.4"
127+
repo1="library/busybox"
128+
repo2="harisekhon/zookeeper:$tag"
125129

126130
echo
127131
for image in $repo1 $repo2; do
@@ -134,14 +138,19 @@ for image in $repo1 $repo2; do
134138
echo
135139
echo "Pushing image $image to Docker Registry $DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT:"
136140
docker push "$DOCKER_REGISTRY_HOST:$DOCKER_REGISTRY_PORT/$image"
141+
hr
137142
echo
138143
done
144+
hr
139145
echo
140146

141147
export SSL_NOVERIFY=1
142148
check "./docker_registry_show_tags.py -S $repo1 $repo2" "Docker Registry Show Tags for $repo1 & $repo2"
149+
hr
143150
check "./docker_registry_show_tags.py -S ${repo2/:*}" "Docker Registry Show Tags for $repo2"
151+
hr
144152
check "./docker_registry_show_tags.py -S ${repo2/:*} | grep '$tag'" "Docker Registry Show Tags search for $repo2 tag $tag"
153+
hr
145154

146155
#docker rm -f "$name"
147156
docker-compose down

0 commit comments

Comments
 (0)