mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Notary test failed in Helm Pipeline
In Helm pipeline, harbor access address is by domain name instead of IP, so cert directory should be created by domain name. Signed-off-by: danfengliu <danfengl@vmware.com>
This commit is contained in:
parent
fe7fdeb723
commit
933dc91ba5
@ -101,7 +101,7 @@ Enable Notary Client
|
||||
|
||||
Remove Notary Signature
|
||||
[Arguments] ${ip} ${image}
|
||||
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/notary-remove-image-signature.expect ${ip} library ${image}
|
||||
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/notary-remove-image-signature.expect ${ip} library ${image} ${notaryServerEndpoint}
|
||||
Log To Console ${output}
|
||||
Log ${output}
|
||||
Should Be Equal As Integers ${rc} 0
|
||||
|
@ -105,7 +105,7 @@ Body Of Admin Push Signed Image
|
||||
Log ${output}
|
||||
|
||||
Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library hello-world:latest
|
||||
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/notary-push-image.sh ${ip} library ${image} latest
|
||||
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/notary-push-image.sh ${ip} library ${image} latest ${notaryServerEndpoint}
|
||||
Log ${output}
|
||||
Should Be Equal As Integers ${rc} 0
|
||||
|
||||
|
@ -4,7 +4,7 @@ docker pull $3:$4
|
||||
|
||||
IP=$1
|
||||
PASSHRASE='Harbor12345'
|
||||
|
||||
notaryServerEndpoint=$5
|
||||
echo $IP
|
||||
|
||||
mkdir -p /etc/docker/certs.d/$IP/
|
||||
@ -13,8 +13,11 @@ mkdir -p ~/.docker/tls/$IP:4443/
|
||||
cp /notary_ca.crt /etc/docker/certs.d/$IP/
|
||||
cp /notary_ca.crt ~/.docker/tls/$IP:4443/
|
||||
|
||||
mkdir -p ~/.docker/tls/$notaryServerEndpoint/
|
||||
cp /notary_ca.crt ~/.docker/tls/$notaryServerEndpoint/
|
||||
|
||||
export DOCKER_CONTENT_TRUST=1
|
||||
export DOCKER_CONTENT_TRUST_SERVER=https://$IP:4443
|
||||
export DOCKER_CONTENT_TRUST_SERVER=https://$notaryServerEndpoint
|
||||
|
||||
export NOTARY_ROOT_PASSPHRASE=$PASSHRASE
|
||||
export NOTARY_TARGETS_PASSPHRASE=$PASSHRASE
|
||||
|
@ -3,9 +3,10 @@
|
||||
set HOST [lindex $argv 0]
|
||||
set PROJECT [lindex $argv 1]
|
||||
set IMAGE [lindex $argv 2]
|
||||
set notaryServerEndpoint [lindex $argv 3]
|
||||
set timeout 30
|
||||
|
||||
spawn notary -s https://$HOST:4443 --tlscacert /notary_ca.crt -d /root/.docker/trust remove -p $HOST/$PROJECT/$IMAGE latest
|
||||
spawn notary -s https://$notaryServerEndpoint --tlscacert /notary_ca.crt -d /root/.docker/trust remove -p $HOST/$PROJECT/$IMAGE latest
|
||||
|
||||
expect {
|
||||
"Enter username:" {send "admin\r";exp_continue}
|
||||
|
@ -546,8 +546,11 @@ Test Case - Project Quotas Control Under GC
|
||||
${image_a_size}= Set Variable 321.03MB
|
||||
${image_a_ver}= Set Variable 6.8.3
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
Capture Page Screenshot
|
||||
Create An New Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit}
|
||||
Capture Page Screenshot
|
||||
Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=will exceed the configured upper limit of 200.0 MiB
|
||||
Capture Page Screenshot
|
||||
GC Now ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
|
||||
@{param} Create List project${d}
|
||||
Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 60 @{param}
|
||||
|
Loading…
Reference in New Issue
Block a user