2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

Add timezone verification to diskfull and diskless hierarchy tests

This commit is contained in:
besawn 2022-01-26 10:53:38 -05:00
parent 287688627e
commit 77be922d80
2 changed files with 20 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