2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

Merge pull request #7097 from besawn/timezone_testcase

Add timezone validation to automated installation testcases
This commit is contained in:
besawn 2022-01-31 12:30:27 -05:00 committed by GitHub
commit bfc90d416f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 0 deletions

View File

@ -100,4 +100,14 @@ cmd:xdsh $$CN "cd /xcatpost; rmdir -p dir1/dir2/dir3"
check:rc==0
cmd:chdef -m -t node -o $$CN postscripts="dir1/dir2/dir3/foo.bar"
check:rc==0
# Check site table timezone
cmd:lsdef -t site -i timezone | awk -F= '{print $2}'
check:rc==0
# Check compute node timezone
cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'
check:rc==0
# Verify the compute node timezone matches the site table timezone
cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz
check:rc==0
end

View File

@ -213,4 +213,14 @@ check:rc==0
cmd:rmimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
# Check site table timezone
cmd:lsdef -t site -i timezone | awk -F= '{print $2}'
check:rc==0
# Check compute node timezone
cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'
check:rc==0
# Verify the compute node timezone matches the site table timezone
cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz
check:rc==0
end

View File

@ -0,0 +1,18 @@
start:verify_timezone
os:Linux
label:timezone
#stop:yes
# Check site table timezone
cmd:lsdef -t site -i timezone | awk -F= '{print $2}'
check:rc==0
# Check compute node timezone
cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'
check:rc==0
# Verify the compute node timezone matches the site table timezone
cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz
check:rc==0
end