From 77be922d804abe48e82816fdb9fb74702022b9ee Mon Sep 17 00:00:00 2001 From: besawn <38794505+besawn@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:53:38 -0500 Subject: [PATCH] Add timezone verification to diskfull and diskless hierarchy tests --- .../reg_linux_diskfull_installation_hierarchy | 10 ++++++++++ .../reg_linux_diskless_installation_hierarchy | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index cfcd0832a..7004e1c8c 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -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 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 1d0c719a0..814d499ee 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -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