From 44c8f3c51423ccd95089260880469c721a92fb44 Mon Sep 17 00:00:00 2001 From: Martin Kolman Date: Thu, 9 Dec 2021 18:21:30 +0100 Subject: [PATCH] Add gating tests Based on RHEL 8 gating tests. Resolves: rhbz#2029986 --- gating.yaml | 6 +++++ tests/branding/Makefile | 52 +++++++++++++++++++++++++++++++++++++++ tests/branding/PURPOSE | 3 +++ tests/branding/runtest.sh | 35 ++++++++++++++++++++++++++ tests/tests.yml | 8 ++++++ 5 files changed, 104 insertions(+) create mode 100644 gating.yaml create mode 100644 tests/branding/Makefile create mode 100644 tests/branding/PURPOSE create mode 100755 tests/branding/runtest.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/branding/Makefile b/tests/branding/Makefile new file mode 100644 index 0000000..29bfb1a --- /dev/null +++ b/tests/branding/Makefile @@ -0,0 +1,52 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /anaconda-user-help.git/branding +# Description: Anaconda user help branding test +# Author: Peter Kotvan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/anaconda-user-help.git/branding +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Peter Kotvan " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Anaconda user help branding test" >> $(METADATA) + @echo "Type: Install" >> $(METADATA) + @echo "TestTime: 20m" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv3" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) +# @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) +# RhtsRequires: + @echo "RhtsRequires: beakerlib" >> $(METADATA) +# Requires: +# @echo "Requires: some-pkg" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/branding/PURPOSE b/tests/branding/PURPOSE new file mode 100644 index 0000000..24b52a9 --- /dev/null +++ b/tests/branding/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /anaconda-user-help.git/branding +Description: Anaconda user help branding test +Author: Peter Kotvan diff --git a/tests/branding/runtest.sh b/tests/branding/runtest.sh new file mode 100755 index 0000000..cfbca3f --- /dev/null +++ b/tests/branding/runtest.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /anaconda-user-help.git/branding +# Description: Anaconda user help branding test +# Author: Peter Kotvan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 Red Hat, Inc. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart +# rlPhaseStartSetup +# rlPhaseEnd + + rlPhaseStartTest + rlLog "Verify whether anaconda user help contains the string fedora." + rlRun -s "rpm -ql anaconda-user-help | xargs grep -irq fedora" 123 + if [[ $? -ne 123 ]] + then + rlFileSubmit ${rlRun_LOG} "fedora_string.log" + fi + rlPhaseEnd + +# rlPhaseStartCleanup +# rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..72d9af2 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,8 @@ +--- +- hosts: all + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - branding