Skip to content

Commit

Permalink
Fix one_line_checks for cloud-init tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mloviska committed Aug 22, 2024
1 parent 30bd222 commit 9b1c9fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/microos/one_line_checks.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9b1c9fb

Please sign in to comment.