[c10s-tmt] TMT: gating tests pulled from upstream
Resolves: RHEL-80817 Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
parent
7ce817df23
commit
2d7b72c814
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
13
gating.yaml
13
gating.yaml
@ -1,7 +1,16 @@
|
|||||||
# recipients: jnovy, lsm5, santiago
|
|
||||||
--- !Policy
|
--- !Policy
|
||||||
product_versions:
|
product_versions:
|
||||||
- rhel-10
|
- fedora-*
|
||||||
|
decision_context:
|
||||||
|
- bodhi_update_push_stable
|
||||||
|
- bodhi_update_push_testing
|
||||||
|
subject_type: koji_build
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||||
|
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-*
|
||||||
decision_context: osci_compose_gate
|
decision_context: osci_compose_gate
|
||||||
rules:
|
rules:
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||||
|
20
plans/main.fmf
Normal file
20
plans/main.fmf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
|
prepare:
|
||||||
|
- when: distro == centos-stream or distro == rhel
|
||||||
|
how: shell
|
||||||
|
script: |
|
||||||
|
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm
|
||||||
|
dnf -y config-manager --set-enabled epel
|
||||||
|
order: 10
|
||||||
|
- when: initiator == packit
|
||||||
|
how: shell
|
||||||
|
script: |
|
||||||
|
COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo"
|
||||||
|
if compgen -G $COPR_REPO_FILE > /dev/null; then
|
||||||
|
sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE
|
||||||
|
fi
|
||||||
|
dnf -y upgrade --allowerasing
|
||||||
|
order: 20
|
@ -72,9 +72,7 @@ registries without the need to pull them
|
|||||||
Summary: Tests for %{name}
|
Summary: Tests for %{name}
|
||||||
|
|
||||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||||
%if %{defined fedora}
|
|
||||||
Requires: bats
|
Requires: bats
|
||||||
%endif
|
|
||||||
Requires: gnupg
|
Requires: gnupg
|
||||||
Requires: jq
|
Requires: jq
|
||||||
Requires: golang
|
Requires: golang
|
||||||
@ -90,7 +88,8 @@ Requires: squashfs-tools
|
|||||||
%description tests
|
%description tests
|
||||||
%{summary}
|
%{summary}
|
||||||
|
|
||||||
This package contains system tests for %{name}
|
This package contains system tests for %{name}. Only intended for distro gating
|
||||||
|
tests. End user / customer usage not supported.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -Sgit %{name}-%{version}
|
%autosetup -Sgit %{name}-%{version}
|
||||||
@ -139,6 +138,9 @@ cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/
|
|||||||
#define license tag if not already defined
|
#define license tag if not already defined
|
||||||
%{!?_licensedir:%global license %doc}
|
%{!?_licensedir:%global license %doc}
|
||||||
|
|
||||||
|
# Placeholder check to silence rpmlint
|
||||||
|
%check
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
|
10
test/tmt/main.fmf
Normal file
10
test/tmt/main.fmf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
require:
|
||||||
|
- bats
|
||||||
|
- skopeo-tests
|
||||||
|
|
||||||
|
environment:
|
||||||
|
SKOPEO_BINARY: /usr/bin/skopeo
|
||||||
|
|
||||||
|
summary: System test
|
||||||
|
test: bash ./test.sh
|
||||||
|
duration: 60m
|
13
test/tmt/test.sh
Normal file
13
test/tmt/test.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -exo pipefail
|
||||||
|
|
||||||
|
uname -r
|
||||||
|
|
||||||
|
rpm -q \
|
||||||
|
bats \
|
||||||
|
containers-common \
|
||||||
|
skopeo \
|
||||||
|
skopeo-tests \
|
||||||
|
|
||||||
|
bats /usr/share/skopeo/test/system
|
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
# Sigh; RHEL8 doesn't have BATS
|
|
||||||
- name: bats | fetch and unpack tarball
|
|
||||||
unarchive:
|
|
||||||
src: https://github.com/bats-core/bats-core/archive/v1.9.0.tar.gz
|
|
||||||
dest: /root
|
|
||||||
remote_src: true
|
|
||||||
|
|
||||||
- name: bats | install
|
|
||||||
command: ./install.sh /usr/local
|
|
||||||
args:
|
|
||||||
chdir: /root/bats-core-1.9.0
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
# Log program and kernel versions
|
|
||||||
echo "Important package versions:"
|
|
||||||
(
|
|
||||||
uname -r
|
|
||||||
rpm -qa | egrep 'skopeo|podman|conmon|crun|runc|iptable|slirp|systemd' | sort
|
|
||||||
) | sed -e 's/^/ /'
|
|
||||||
|
|
||||||
# Log environment; or at least the useful bits
|
|
||||||
echo "Environment:"
|
|
||||||
env | grep -v LS_COLORS= | sort | sed -e 's/^/ /'
|
|
||||||
|
|
||||||
SKOPEO_BINARY=/usr/bin/skopeo bats /usr/share/skopeo/test/system
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
tags: classic
|
|
||||||
roles:
|
|
||||||
- role: bats_installed
|
|
||||||
- role: standard-test-basic
|
|
||||||
tags:
|
|
||||||
- classic
|
|
||||||
- container
|
|
||||||
required_packages:
|
|
||||||
- skopeo
|
|
||||||
- skopeo-tests
|
|
||||||
tests:
|
|
||||||
- root-test:
|
|
||||||
dir: ./
|
|
||||||
run: ./test_skopeo.sh
|
|
||||||
timeout: 15m
|
|
@ -1 +0,0 @@
|
|||||||
- import_playbook: test_skopeo.yml
|
|
Loading…
Reference in New Issue
Block a user