From 8ed7778ec0ff5e225e1af1af5b0ec90bcfcbb250 Mon Sep 17 00:00:00 2001 From: mloviska Date: Thu, 22 Aug 2024 15:56:07 +0200 Subject: [PATCH] Fix one_line_checks for cloud-init tests cloud-init user date sets CEST instead of UTC in image configuration. As a part of https://progress.opensuse.org/issues/162938, fix timezone check. --- tests/microos/one_line_checks.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/microos/one_line_checks.pm b/tests/microos/one_line_checks.pm index 0118094cfa62..cc51b7f1d36a 100644 --- a/tests/microos/one_line_checks.pm +++ b/tests/microos/one_line_checks.pm @@ -14,7 +14,8 @@ use utils; sub run_rcshell_checks { # Check that system is using UTC timezone - assert_script_run 'date +"%Z" | grep -x UTC'; + my $timezone = get_var('FIRST_BOOT_CONFIG', '') =~ /cloud-init/ ? 'CEST' : 'UTC'; + assert_script_run "date +\"%Z\" | grep -x $timezone"; } sub run_common_checks {