Update to 44

+ Use tmt based tests instead of STI
+ Disable tmt integration tests for CS9 (needs RH resources)

Resolves: rhbz#2011877
This commit is contained in:
Brian C. Lane 2022-02-01 10:59:58 -08:00 committed by Simon Steinbeiss
parent 546ccc7076
commit 53595c6430
10 changed files with 41 additions and 46 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@
/osbuild-composer-41.tar.gz
/osbuild-composer-42.tar.gz
/osbuild-composer-43.tar.gz
/osbuild-composer-44.tar.gz

View File

@ -2,9 +2,14 @@
# Pass --with tests to rpmbuild to override
%bcond_with tests
# When --with relax_requires is specified osbuild-composer-tests
# will require osbuild-composer only by name, excluding version/release
# This is used internally during nightly pipeline testing!
%bcond_with relax_requires
%global goipath github.com/osbuild/osbuild-composer
Version: 43
Version: 44
%gometa
@ -61,6 +66,7 @@ BuildRequires: golang(github.com/segmentio/ksuid)
BuildRequires: golang(github.com/stretchr/testify/assert)
BuildRequires: golang(github.com/ubccr/kerby)
BuildRequires: golang(github.com/vmware/govmomi)
BuildRequires: golang(github.com/oracle/oci-go-sdk/v54)
BuildRequires: golang(cloud.google.com/go)
BuildRequires: golang(gopkg.in/ini.v1)
%endif
@ -219,6 +225,7 @@ install -m 0755 -vp tools/gen-ssh.sh %{buildroot}%
install -m 0755 -vp tools/image-info %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/run-koji-container.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/koji-compose.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/koji-compose-v2.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/libvirt_test.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/set-env-variables.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/test-case-generators/generate-test-cases %{buildroot}%{_libexecdir}/osbuild-composer-test/
@ -369,7 +376,11 @@ The dnf-json binary used by osbuild-composer and the workers.
%package tests
Summary: Integration tests
%if %{with relax_requires}
Requires: %{name}
%else
Requires: %{name} = %{version}-%{release}
%endif
Requires: composer-cli
Requires: createrepo_c
Requires: xorriso
@ -397,6 +408,7 @@ Requires: libvirt-daemon-driver-storage-disk
Requires: libvirt-daemon-kvm
Requires: qemu-img
Requires: qemu-kvm
Requires: rpmdevtools
Requires: virt-install
Requires: expect
Requires: python3-lxml
@ -432,6 +444,9 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
%endif
%changelog
* Fri Feb 11 2022 Thomas Lavocat <tlavocat@redhat.com> - 44-1
- New upstream release
* Wed Jan 26 2022 Thomas Lavocat <tlavocat@redhat.com> - 43-1
- New upstream release

View File

@ -0,0 +1,12 @@
summary: Run integration tests
prepare:
how: install
package:
- osbuild-composer-tests
execute:
script: ./tests/scripts/run_tests.sh ./tests/
duration: 24h
enabled: true
adjust:
enabled: false
when: distro == centos-stream-9

6
plans/unit-tests.fmf Normal file
View File

@ -0,0 +1,6 @@
summary: Run unit tests from source
discover:
how: fmf
dist-git-source: true
execute:
how: tmt

View File

@ -1 +1 @@
SHA512 (osbuild-composer-43.tar.gz) = b83df92e13effed7a914dd9e917f6e5ec5626286771e65aec9156fbc636c105bb98cf868ec97fd7599eaab58d05652f23a77f5394f00bf51f1d9578f01395a8f
SHA512 (osbuild-composer-44.tar.gz) = 7c9a66ae2415ad754851c2af7a2064ac870bb91cccdab42f27d07dc3ee18d2602e8f33f5ddd27ca686d784f83853ba96330b2834469a73c4e307469ed8798168

View File

@ -1,4 +0,0 @@
---
standard-inventory-qcow2:
qemu:
m: 4G # Amount of VM memory

View File

@ -1,18 +0,0 @@
- hosts: localhost
pre_tasks:
- name: make sure that /tmp is sharing disk space with /
mount:
path: /tmp
state: unmounted
tags:
- classic
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- osbuild-composer-tests
tests:
- integration:
dir: scripts
run: ./run_tests.sh {{ tenv_workdir }}

View File

@ -1,22 +0,0 @@
- hosts: localhost
pre_tasks:
- name: make sure that /tmp is sharing disk space with /
mount:
path: /tmp
state: unmounted
tags:
- classic
roles:
- role: standard-test-source
tags:
- always
- role: standard-test-basic
tags:
- classic
tests:
- unit:
dir: source
run: GOFLAGS=-mod=vendor go test ./...
required_packages:
- golang
- krb5-devel # required by the koji integration, code cannot be compiled without this packages

5
tests/unit.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Run unit tests
require:
- golang
- krb5-devel
test: cd ../osbuild-composer-*/ && GOFLAGS=-mod=vendor go test ./...