mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 12:15:20 +01:00
add notary test
This commit is contained in:
parent
872a01b342
commit
8f31230255
@ -100,6 +100,7 @@ script:
|
|||||||
- sudo make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=danieljt/harbor-clarity-base:0.8.4 NOTARYFLAG=true
|
- sudo make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=danieljt/harbor-clarity-base:0.8.4 NOTARYFLAG=true
|
||||||
|
|
||||||
- docker ps
|
- docker ps
|
||||||
|
- ./tests/notarytest.sh
|
||||||
- go run tests/startuptest.go https://localhost/
|
- go run tests/startuptest.go https://localhost/
|
||||||
- go run tests/userlogintest.go -name ${HARBOR_ADMIN} -passwd ${HARBOR_ADMIN_PASSWD}
|
- go run tests/userlogintest.go -name ${HARBOR_ADMIN} -passwd ${HARBOR_ADMIN_PASSWD}
|
||||||
|
|
||||||
|
19
tests/notarytest.sh
Executable file
19
tests/notarytest.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
TIMEOUT=10
|
||||||
|
while [ $TIMEOUT -gt 0 ]; do
|
||||||
|
STATUS=$(curl -s -o /dev/null -w '%{http_code}' https://127.0.0.1/notary/v2/ -kv)
|
||||||
|
if [ $STATUS -eq 401 ]; then
|
||||||
|
echo "Notary is running success."
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
TIMEOUT=$(($TIMEOUT - 1))
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $TIMEOUT -eq 0 ]; then
|
||||||
|
echo "Notary is running fail."
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user