Skip to content

Commit bc32351

Browse files
committed
tests: Add new Anaconda suite
This covers the tar export workflow which is currently custom. In the future though I'd like to have more direct support for Anaconda using bootc-dev/bcvk#202 Assisted-by: OpenCode (Opus 4.5) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 4d9c4b3 commit bc32351

6 files changed

Lines changed: 3149 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,49 @@ jobs:
267267
name: tmt-log-PR-${{ github.event.number }}-fedora-43-coreos-${{ env.ARCH }}
268268
path: /var/tmp/tmt
269269

270+
# Test Anaconda installation with SSH verification
271+
# Tests the complete Anaconda workflow including SSH access to installed systems
272+
test-anaconda:
273+
needs: package
274+
runs-on: ubuntu-24.04
275+
276+
strategy:
277+
fail-fast: false
278+
matrix:
279+
test_os: [fedora-43, centos-9]
280+
281+
steps:
282+
- uses: actions/checkout@v6
283+
- name: Bootc Ubuntu Setup
284+
uses: bootc-dev/actions/bootc-ubuntu-setup@main
285+
with:
286+
libvirt: true
287+
288+
- name: Setup env
289+
run: |
290+
BASE=$(just pullspec-for-os base ${{ matrix.test_os }})
291+
echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
292+
echo "BOOTC_variant=ostree" >> $GITHUB_ENV
293+
294+
- name: Download package artifacts
295+
uses: actions/download-artifact@v7
296+
with:
297+
name: packages-${{ matrix.test_os }}
298+
path: target/packages/
299+
300+
- name: Build container and run Anaconda SSH test
301+
run: |
302+
BOOTC_SKIP_PACKAGE=1 just build
303+
# Run Anaconda test with SSH verification directly
304+
just test-anaconda localhost/bootc /tmp/bootc-anaconda-${{ matrix.test_os }}.raw --ssh -- bootc status
305+
just clean-local-images
306+
307+
308+
270309
# Sentinel job for required checks - configure this job name in repository settings
271310
required-checks:
272311
if: always()
273-
needs: [cargo-deny, validate, package, test-integration, test-coreos]
312+
needs: [cargo-deny, validate, package, test-integration, test-coreos, test-anaconda]
274313
runs-on: ubuntu-latest
275314
steps:
276315
- run: exit 1
@@ -279,4 +318,5 @@ jobs:
279318
needs.validate.result != 'success' ||
280319
needs.package.result != 'success' ||
281320
needs.test-integration.result != 'success' ||
282-
needs.test-coreos.result != 'success'
321+
needs.test-coreos.result != 'success' ||
322+
needs.test-anaconda.result != 'success'

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Justfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ test-tmt-on-coreos *ARGS:
132132
run-container-external-tests:
133133
./tests/container/run {{base_img}}
134134

135+
# Run end-to-end Anaconda installation test
136+
[group('testing')]
137+
test-anaconda IMAGE=base_img OUTPUT="test-disk.raw" *ARGS:
138+
cargo xtask anaconda {{IMAGE}} {{OUTPUT}} {{ARGS}}
139+
140+
# Test with auto-detected installer
141+
[group('testing')]
142+
test-anaconda-auto IMAGE=base_img OUTPUT="test-disk.raw" *ARGS:
143+
cargo xtask anaconda --installer-type auto {{IMAGE}} {{OUTPUT}} {{ARGS}}
144+
145+
# Test with CentOS Stream installer
146+
[group('testing')]
147+
test-anaconda-centos IMAGE=base_img OUTPUT="test-disk.raw" *ARGS:
148+
cargo xtask anaconda --installer-type centos-stream {{IMAGE}} {{OUTPUT}} {{ARGS}}
149+
135150
# Remove all test VMs created by tmt tests
136151
[group('testing')]
137152
tmt-vm-cleanup:

crates/xtask/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ rand = "0.9"
3333
serde_yaml = "0.9"
3434
tar = "0.4"
3535
itertools = "0.14.0"
36+
shlex = { workspace = true }
3637

3738
[lints]
3839
workspace = true

0 commit comments

Comments
 (0)