Skip to content

Commit

Permalink
Merge pull request #7265 from gurevichmark/xcat_pubkey_test
Browse files Browse the repository at this point in the history
Add testcase to verify xCAT public keys
  • Loading branch information
besawn committed Oct 19, 2022
2 parents 9a76d27 + bc35fbb commit 94cc776
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions xCAT-test/autotest/testcase/go_xcat/case3
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,33 @@ check:output=~Version
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running

#Uninstall xCAT, then install again and verify public keys
cmd:xdsh $$CN "cd /; ./go-xcat completely uninstall"
check:rc==0
check:output=~xCAT has been uninstalled

#Remove --nogpgcheck (yum/dnf) --no-gpg-checks (zypper) and --allow-unauthenticated (apt-get) flags from go-xcat
# to install xCAT public key when installing packages
cmd:xdsh $$CN "sed -i 's/\-\-nogpgcheck//g' /go-xcat"
cmd:xdsh $$CN "sed -i 's/\-\-no\-gpg\-checks//g' /go-xcat"
cmd:xdsh $$CN "sed -i 's/\-\-allow\-unauthenticated//g' /go-xcat"

#Install devel version of xCAT. If first attempt fails, try again
cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y install"
cmd:version=`xdsh $$CN /opt/xcat/bin/lsxcatd -v`; if [[ $version =~ "Version" ]]; then echo "xCAT installed successfully first time"; else echo "First attempt to install xCAT failed, attempting to install xCAT again"; xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y install"; fi

cmd:xdsh $$CN "source /etc/profile.d/xcat.sh; lsxcatd -v"
check:output=~Version
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running

#Verify xCAT public key was installed
cmd:xdsh $$CN "rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'"
check:output=~xCAT Automatic Signing Key

cmd:xdsh $$CN "rpm -e gpg-pubkey-ca548a47-5b2c830b"
cmd:xdsh $$CN "service xcatd stop"
end

Expand Down

0 comments on commit 94cc776

Please sign in to comment.