Skip to content

Commit

Permalink
Merge pull request #1032 from rvykydal/add-timezone-noncommon-test
Browse files Browse the repository at this point in the history
Add timezone noncommon test
  • Loading branch information
rvykydal authored Nov 30, 2023
2 parents db87c91 + 45cc2eb commit 8d8f322
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions containers/runner/skip-testtypes
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ rhel8_skip_array=(
gh830 # packages-weakdeps failing
gh969 # raid-ddf failing
gh1018 # bridge-no-bootopts-net failing
jiraRHEL-13151 # timezone-noncommon failing
)

rhel9_skip_array=(
Expand All @@ -60,6 +61,7 @@ rhel9_skip_array=(
gh790 # repo-addrepo-hd-tree failing
gh969 # raid-ddf failing
gh970 # selinux-contexts failing
jiraRHEL-13150 # timezone-noncommon failing
)

# used in workflows/daily-boot-iso-rhel8.yml
Expand Down
35 changes: 35 additions & 0 deletions timezone-noncommon.ks.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#version=DEVEL
#test name: timezone-noncommon
# Test that timezones that are in pytz.all_timezones but not in
# pytz.common_timezones can be used in kickstart
# (jira#RHEL-13150, jira#RHEL-13151, rhbz#1452873)
%ksappend repos/default.ks
network --bootproto=dhcp

bootloader --timeout=1
zerombr
clearpart --all --initlabel
autopart

keyboard us
lang en
timezone Japan
rootpw testcase

shutdown

%packages
%end

%post

link=$(readlink /etc/localtime)
if [[ ${link#*zoneinfo/} != "Japan" ]]; then
echo "*** /etc/localtime does not point to the configured timezone" >> /root/RESULT
fi

# everything passes
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end
24 changes: 24 additions & 0 deletions timezone-noncommon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright (C) 2023 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY expressed or implied, including the implied warranties of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details. You should have received a copy of the
# GNU General Public License along with this program; if not, write to the
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the
# source code or documentation are not subject to the GNU General Public
# License and may only be used or replicated with the express permission of
# Red Hat, Inc.
#
# Red Hat Author(s): Radek Vykydal <[email protected]>

# Ignore unused variable parsed out by tooling scripts as test tags metadata
# shellcheck disable=SC2034
TESTTYPE="time jiraRHEL-13151 jiraRHEL-13150"

. ${KSTESTDIR}/functions.sh

0 comments on commit 8d8f322

Please sign in to comment.