harbor/tests/robot-cases/Group0-Util/notary-remove-image-signature.expect
Danfeng Liu (c) 8bfc5d12c3 Change parameter image to optional
1. Change parameter in Keyword Body Of Admin Push Signed Image to an
optional one.
2. Loose the restriction for Quotas error message verification.
3. Get cert for notary from API instead of local file.

Signed-off-by: Danfeng Liu (c) <danfengl@vmware.com>
2019-12-19 16:54:59 +08:00

19 lines
496 B
Plaintext
Executable File

#!/usr/local/bin/expect
set HOST [lindex $argv 0]
set PROJECT [lindex $argv 1]
set IMAGE [lindex $argv 2]
set timeout 30
spawn notary -s https://$HOST:4443 --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