diff --git a/tests/.fmf/version b/.fmf/version similarity index 100% rename from tests/.fmf/version rename to .fmf/version diff --git a/.gitignore b/.gitignore index ee19be0..b40a2a9 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /osbuild-composer-41.tar.gz /osbuild-composer-42.tar.gz /osbuild-composer-43.tar.gz +/osbuild-composer-44.tar.gz diff --git a/osbuild-composer.spec b/osbuild-composer.spec index d182817..8a419bd 100644 --- a/osbuild-composer.spec +++ b/osbuild-composer.spec @@ -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 - 44-1 +- New upstream release + * Wed Jan 26 2022 Thomas Lavocat - 43-1 - New upstream release diff --git a/plans/integration-tests.fmf b/plans/integration-tests.fmf new file mode 100644 index 0000000..eaff21e --- /dev/null +++ b/plans/integration-tests.fmf @@ -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 diff --git a/plans/unit-tests.fmf b/plans/unit-tests.fmf new file mode 100644 index 0000000..7fc52d4 --- /dev/null +++ b/plans/unit-tests.fmf @@ -0,0 +1,6 @@ +summary: Run unit tests from source +discover: + how: fmf + dist-git-source: true +execute: + how: tmt diff --git a/sources b/sources index 922a009..0ab5e73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (osbuild-composer-43.tar.gz) = b83df92e13effed7a914dd9e917f6e5ec5626286771e65aec9156fbc636c105bb98cf868ec97fd7599eaab58d05652f23a77f5394f00bf51f1d9578f01395a8f +SHA512 (osbuild-composer-44.tar.gz) = 7c9a66ae2415ad754851c2af7a2064ac870bb91cccdab42f27d07dc3ee18d2602e8f33f5ddd27ca686d784f83853ba96330b2834469a73c4e307469ed8798168 diff --git a/tests/provision.fmf b/tests/provision.fmf deleted file mode 100644 index 4e4898f..0000000 --- a/tests/provision.fmf +++ /dev/null @@ -1,4 +0,0 @@ ---- -standard-inventory-qcow2: - qemu: - m: 4G # Amount of VM memory diff --git a/tests/tests_integration.yml b/tests/tests_integration.yml deleted file mode 100644 index 7a9b845..0000000 --- a/tests/tests_integration.yml +++ /dev/null @@ -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 }} diff --git a/tests/tests_unit.yml b/tests/tests_unit.yml deleted file mode 100644 index 6489793..0000000 --- a/tests/tests_unit.yml +++ /dev/null @@ -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 diff --git a/tests/unit.fmf b/tests/unit.fmf new file mode 100644 index 0000000..2b796cb --- /dev/null +++ b/tests/unit.fmf @@ -0,0 +1,5 @@ +summary: Run unit tests +require: + - golang + - krb5-devel +test: cd ../osbuild-composer-*/ && GOFLAGS=-mod=vendor go test ./...