Skip to content

Commit e68951f

Browse files
committed
feat: e2e testing
1 parent 96d8ab8 commit e68951f

38 files changed

+518
-0
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: End to End Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
container:
11+
image: fedora:43
12+
steps:
13+
- name: Install dependencies
14+
run: |
15+
dnf builddep -y ci/readymade.spec
16+
dnf install -y isotovideo edk2-ovmf
17+
18+
- uses: actions/checkout@v6
19+
with:
20+
submodules: true
21+
22+
- name: Run tests
23+
run: cd test && ./test.sh

test/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
work

test/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Testing Readymade
2+
3+
This directory contains a simple test script and environment to verify that the Readymade backend works properly. It does the following:
4+
1. Downloads an Ultramarine disk image, and sets up a target disk to install to.
5+
2. Generates a Readymade playbook which gets loaded by the readymade-playbook helper, which executes the readymade backend and installs the operating system.
6+
3. Uses isotovideo from OpenQA and the files in distri/ to boot the target disk and verify that the installation was successful.
7+
8+
## Running the test
9+
Just cd into the test directory and run `./test.sh`.
10+
11+
## Notes
12+
* Right now this test suite only tests one installation configuration, but it should be extended to support more partition schemes, distros, and postinstall modules.

test/distri/main.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
use strict;
2+
use warnings;
3+
use testapi;
4+
use autotest;
5+
6+
autotest::loadtest 'tests/boot.pm';
7+
8+
1;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"properties": [],
3+
"tags": ["bootloader"],
4+
"area": [
5+
{
6+
"xpos": 24,
7+
"ypos": 82,
8+
"width": 142,
9+
"height": 16,
10+
"type": "match"
11+
}
12+
]
13+
}

test/distri/needles/bootloader.png

39.6 KB
Loading

test/distri/needles/desktop.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"properties": [],
3+
"tags": [
4+
"desktop"
5+
],
6+
"area": [
7+
{
8+
"xpos": 14,
9+
"ypos": 727,
10+
"width": 41,
11+
"height": 37,
12+
"type": "match"
13+
}
14+
]
15+
}

test/distri/needles/desktop.png

237 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"properties": [],
3+
"tags": [
4+
"initial-setup-codecs"
5+
],
6+
"area": [
7+
{
8+
"xpos": 408,
9+
"ypos": 309,
10+
"width": 217,
11+
"height": 31,
12+
"type": "match"
13+
},
14+
{
15+
"xpos": 805,
16+
"ypos": 679,
17+
"width": 53,
18+
"height": 26,
19+
"type": "match",
20+
"click_point": {
21+
"xpos": 26,
22+
"ypos": 13
23+
}
24+
}
25+
]
26+
}
157 KB
Loading

0 commit comments

Comments
 (0)