Reworked gating plan to support upgrade testing

- Allowed multiple plans
- CI Gating tied up with gating.fmf plan
- Added basic framework for upgrade testing
- Testcases tagged to make those linked with plans
This commit is contained in:
Jan Kurik 2023-01-16 18:48:52 +01:00
parent 7df44b0c3b
commit 356df95bb6
14 changed files with 129 additions and 28 deletions

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

View File

@ -4,16 +4,4 @@ product_versions:
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/gating.functional}

View File

@ -1,5 +1,6 @@
summary: CI Gating Plan
discover:
how: fmf
filter: tag:gating
execute:
how: tmt

View File

@ -11,5 +11,5 @@ recommend:
- cyrus-sasl-scram
- cyrus-sasl-lib
duration: 15m
extra-summary: /tools/pcp/Sanity/SASL-authentication-check
extra-task: /tools/pcp/Sanity/SASL-authentication-check
tag:
- gating

View File

@ -9,5 +9,5 @@ recommend:
- python3-pcp
- python-pcp
duration: 15m
extra-summary: /tools/pcp/Sanity/pcp-python-compliance
extra-task: /tools/pcp/Sanity/pcp-python-compliance
tag:
- gating

View File

@ -12,5 +12,5 @@ recommend:
- pcp-zeroconf
- redis
duration: 15m
extra-summary: /tools/pcp/Sanity/pcp-services
extra-task: /tools/pcp/Sanity/pcp-services
tag:
- gating

View File

@ -27,3 +27,5 @@ recommend:
- /usr/bin/netstat
- pcp-testsuite
duration: 4h
tag:
- gating

View File

@ -1,4 +1,4 @@
summary: Verification of rpm's config files
summary: Verification of rpms config files
description: 'Verification of rpms config files'
contact: Jan Kuřík <jkurik@redhat.com>
component:
@ -9,5 +9,5 @@ recommend:
- pcp
- rpm-build
duration: 15m
extra-summary: /tools/pcp/Sanity/rpm-config-files
extra-task: /tools/pcp/Sanity/rpm-config-files
tag:
- gating

View File

@ -12,5 +12,5 @@ recommend:
- pcp-libs
- binutils
duration: 15m
extra-summary: /tools/pcp/Sanity/shared-libraries-need-symbol-versioning
extra-task: /tools/pcp/Sanity/shared-libraries-need-symbol-versioning
tag:
- gating

View File

@ -0,0 +1,3 @@
PURPOSE of /Sanity/upgrade
Description: upgrade test between different distro releases
Author: Jan Kurik <jkurik@redhat.com>

View File

@ -0,0 +1,33 @@
summary: upgrade
description: ''
contact: Jan Kurik <jkurik@redhat.com>
component:
- pcp
test: ./runtest.sh
framework: beakerlib
require:
- library(ControlFlow/mcase)
recommend:
- pcp
- beakerlib
- time
- sudo
- procps-ng
- avahi
- bzip2
- pcp-pmda-cisco
- coreutils
- pcp-pmda-news
- perl-PCP-LogImport
- perl-PCP-LogSummary
- python-pcp
- gcc
- redhat-rpm-config
- perl-PCP-LogSummary
- libuv
- libuv-devel
- /usr/bin/netstat
- pcp-testsuite
duration: 1h
tag:
- upgrade

73
tests/Sanity/upgrade/runtest.sh Executable file
View File

@ -0,0 +1,73 @@
#!/bin/bash
#shellcheck disable=SC1091
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/pcp/Sanity/upgrade
# Description: upgrade
# Author: Jan Kurik <jkurik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2022 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
. ../../Library/pcpcommon/lib.sh || exit 1
#shellcheck disable=SC2034
PACKAGE=pcp
distribution_mcase__test() {
rlLogInfo 'Verify scenario upgrade works'
rlRun "pcpcommonLibraryLoaded"
rlRun "rlServiceStart pmcd pmlogger" 0,1
rlRun "rlServiceEnable pmcd pmlogger" 0-255
rlRun "sleep 10"
rlRun "pcpcommon_test -g sanity -g pmda.linux" || rlRun "pcpcommon_log_system_info"
rlRun "pcpcommon_cleanup"
}
rlJournalStart
rlPhaseStartSetup "init"
export LANG=en_US.UTF-8
export LANGUAGE=en_US:en
export LC_CTYPE=POSIX
export LC_NUMERIC=POSIX
export LC_TIME=POSIX
export LC_COLLATE=POSIX
export LC_MONETARY=POSIX
export LC_MESSAGES=POSIX
export LC_PAPER=POSIX
export LC_NAME=POSIX
export LC_ADDRESS=POSIX
export LC_TELEPHONE=POSIX
export LC_MEASUREMENT=POSIX
export LC_IDENTIFICATION=POSIX
export LC_ALL=
rlImport "ControlFlow/mcase"
rlPhaseEnd
distribution_mcase__run
rlJournalPrintText
rlJournalEnd
#template by morf-0.29.25

View File

@ -11,5 +11,5 @@ recommend:
- pcp
- pcp-zeroconf
duration: 5m
extra-summary: /tools/pcp/Sanity/verify-systemd-units
extra-task: /tools/pcp/Sanity/verify-systemd-units
tag:
- gating

View File

@ -11,5 +11,5 @@ recommend:
- pcp
- pcp-testsuite
duration: 15m
extra-summary: /tools/pcp/Sanity/writeable-suid-guid
extra-task: /tools/pcp/Sanity/writeable-suid-guid
tag:
- gating