[c9s-tmt] TMT: gating tests pulled from upstream
Resolves: RHEL-80816 Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
parent
80791c4ff0
commit
45f69aca59
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
|
||||
product_versions:
|
||||
- rhel-9
|
||||
- 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
|
||||
rules:
|
||||
- !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
|
@ -66,10 +66,7 @@ registries without the need to pull them
|
||||
Summary: Tests for %{name}
|
||||
|
||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||
%if %{defined fedora}
|
||||
Requires: bats
|
||||
Requires: fakeroot
|
||||
%endif
|
||||
Requires: gnupg
|
||||
Requires: jq
|
||||
Requires: golang
|
||||
@ -82,7 +79,8 @@ Requires: squashfs-tools
|
||||
%description tests
|
||||
%{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
|
||||
%if 0%{?branch:1}
|
||||
|
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