harbor/tests/robot-cases/Group0-Util/notary-remove-image-signature.expect
danfengliu 933dc91ba5 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>
2019-12-27 17:02:28 +08:00

20 lines
549 B
Plaintext
Executable File

#!/usr/local/bin/expect
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://$notaryServerEndpoint --tlscacert /notary_ca.crt -d /root/.docker/trust remove -p $HOST/$PROJECT/$IMAGE latest
expect {
"Enter username:" {send "admin\r";exp_continue}
"Enter password:" {send "Harbor12345\r";exp_continue}
"Enter passphrase for targets key with ID*" {send "Harbor12345\r"}
timeout {exit 1}
}
expect eof
exit 0