Skip to content

Commit

Permalink
Enable /plans/provision/virtual for pull requests
Browse files Browse the repository at this point in the history
Let's start slowly but surely moving the full test suite execution
to pull request testing to catch problems early, prevent the
last-minute surprises and speed up the final release tasks.
  • Loading branch information
psss committed Jan 16, 2024
1 parent a6338c3 commit fa4ea09
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ jobs:
targets:
- fedora-all
- epel-9
use_internal_tf: True
tf_extra_params:
test:
tmt:
name: /plans/features/(core|basic)
# FIXME Run just the provision plan
# to speed up the pull request debugging
name: /plans/provision/virtual

# Test pull requests (full)
- job: tests
Expand Down
48 changes: 42 additions & 6 deletions plans/provision/virtual.fmf
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@
summary: Virtual machine via testcloud

description: |
Verify functionality of the virtual provision plugin. Run
tests which exercise various features of the testcloud plugin
even if not directly related to the provision implementation.

The plan takes care of fetching the image to speed up the
execution. Each test should consume the `PROVISION_METHODS`
variable and use `provision --how virtual` on their own.

discover:
how: fmf
filter: 'tag:virtual & tier:1 | tag:provision-virtual-only'
provision:
how: virtual
# image: fedora
# memory: 2048
# disk: 10
filter: 'tag:provision-virtual'

prepare+:
- name: required-packages
how: install
package: guestfs-tools

- name: start-libvirtd
script: |
sudo systemctl start libvirtd
sudo systemctl status libvirtd

- name: prepare-image
summary: Fetch the image, refresh dnf cache, install beakerlib
script: |
tmt run --remove plan --default provision --how virtual finish
for image in /var/tmp/tmt/testcloud/images/*qcow2; do
virt-customize --add $image --run-command 'dnf --refresh install -y beakerlib'
done

enabled: true

environment:
PROVISION_METHODS: virtual

adjust+:
- provision:
hardware:
virtualization:
is-supported: true
memory: ">= 4 GB"
when: trigger == commit
6 changes: 1 addition & 5 deletions tests/core/escaping/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ description:
test: ./test.sh
framework: beakerlib
tag-: [container, virtual]
tag+: [provision-virtual]

environment:
PROVISION_METHODS: local container
adjust:
- when: how == full
environment:
PROVISION_METHODS: container virtual local
tag+: [additional_coverage]

0 comments on commit fa4ea09

Please sign in to comment.