Skip to content

Commit

Permalink
Merge pull request #638 from henrywang/new_e2e
Browse files Browse the repository at this point in the history
Test: Run e2e test on Packit
  • Loading branch information
cgwalters authored Jul 3, 2024
2 parents 58474bb + 309beb1 commit 9459a66
Show file tree
Hide file tree
Showing 31 changed files with 643 additions and 1,277 deletions.
96 changes: 0 additions & 96 deletions .github/workflows/integration.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
---
specfile_path: contrib/packaging/bootc.spec

files_to_sync:
- contrib/packaging/bootc.spec
- .packit.yaml

upstream_tag_template: v{version}

upstream_package_name: bootc
downstream_package_name: bootc

srpm_build_deps:
- cargo
- git
- zstd
- libzstd-devel
- ostree-devel
- openssl-devel

actions:
# The last setp here is required by Packit to return the archive name
# https://packit.dev/docs/configuration/actions#create-archive
create-archive:
- bash -c "cargo install cargo-vendor-filterer"
- bash -c "cargo xtask spec"
- bash -c "cat target/bootc.spec"
- bash -c "cp target/bootc* contrib/packaging/"
- bash -c "ls -1 target/bootc*.tar.zstd | grep -v 'vendor'"
# Do nothing with spec file. Two steps here are for debugging
fix-spec-file:
- bash -c "cat contrib/packaging/bootc.spec"
- bash -c "ls -al contrib/packaging/"

jobs:
# Only add CS10 and RHEL-9 RPM build test
# But no e2e test on CS10 and RHEL-9
- job: copr_build
trigger: pull_request
targets:
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-9-ppc64le
- fedora-40-x86_64
- fedora-40-aarch64
- fedora-40-ppc64le
- fedora-rawhide-x86_64
- fedora-rawhide-aarch64
- fedora-rawhide-ppc64le
- rhel-9-x86_64
- rhel-9-aarch64

- job: tests
trigger: pull_request
targets:
Expand All @@ -8,3 +58,21 @@ jobs:
tmt_plan: /integration-build
skip_build: true
identifier: integration-test

- job: tests
trigger: pull_request
targets:
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- fedora-40-x86_64
tmt_plan: /to-existing-root
identifier: e2e-test-to-existing-root

- job: tests
trigger: pull_request
targets:
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- fedora-40-aarch64
tmt_plan: /to-disk
identifier: e2e-test-to-disk
59 changes: 59 additions & 0 deletions plans/e2e.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
discover:
how: fmf
test: e2e
adjust:
- when: arch == x86_64 or arch == aarch64
provision:
hardware:
cpu:
processors: ">= 2"
memory: ">= 6 GB"
virtualization:
is-supported: true
prepare:
- how: shell
script: |
source /etc/os-release
if [[ "$ID" == "centos" ]]; then
# EPEL for genisoimage
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
fi
- how: install
package:
- ansible-core
- firewalld
- podman
- skopeo
- jq
- openssl
- qemu-img
- qemu-kvm
- libvirt
- virt-install
- genisoimage
- how: shell
script: ansible-galaxy collection install https://ansible-collection.s3.amazonaws.com/ansible-posix-1.5.4.tar.gz https://ansible-collection.s3.amazonaws.com/community-general-8.5.0.tar.gz
execute:
how: tmt

/to-existing-root:
summary: Run bootc install to-existing-root and bootc switch test locally (nested)
environment+:
TEST_CASE: to-existing-root
discover+:
test:
- /to-existing-root
adjust+:
- when: arch == ppc64le
enabled: false

/to-disk:
summary: Run bootc install to-disk and bootc upgrade test locally (nested)
environment+:
TEST_CASE: to-disk
discover+:
test:
- /to-disk
adjust+:
- when: arch == ppc64le
enabled: false
101 changes: 0 additions & 101 deletions plans/install-upgrade.fmf

This file was deleted.

11 changes: 11 additions & 0 deletions tests/e2e/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## End to end (e2e) Test

### Scenarios

End to end (e2e) test includes `bootc install to-existing-root`, `bootc install to-disk`, `bootc upgrade`, and `bootc switch` tests

* bootc install/upgrade/switch scenario will install, upgrade, and switch bootc image and have some system checking, such as check mount point/permission, run podman with root and rootless, check persistent log, etc.

### Run end to end Test

Test run is drived by [Packit](https://packit.dev/) and running on [Testing-farm](https://docs.testing-farm.io/).
Loading

0 comments on commit 9459a66

Please sign in to comment.