Add some yaml anchors in the templating test to ensure those are
correctly handled. This is in preperation for switching the yaml
package.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Move te overlay-non-existent-destination test to be part of the
various exit_test tests so it can be ran in CI.
Co-authored-by: sjoerdsimons <22603932+sjoerdsimons@users.noreply.github.com>
The user-mode-linux backend appears to be buggy in trixie. Disable
the user-mode-linux backend tests.
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
Let verify (indirectly) save the cleaned keyring paths back to the
action arguments so those are used for the Run as well
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
parted will return an error code if the partition
table is not found, and will print the message:
"unrecognised disk label"
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Since the introduction of sectorsize header,
the raw action have to handle sector size computation.
Add a test recipe, to cover this feature.
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Newer storage, such as UFS or NVMe disk, may not support the
default 512 sector size.
For these devices, the partition table and the partition offset
need to be aligned with sector size boundaries. The GPT partition
table is 34 sectors in length, so we can't have compatible disk images
between 512 and 4096 sector-size devices.
This patch introduces a major breakage with the {{ sector 64 }}
template.
At template processing, we can't guess the appropriate sector size
for the image since this value can be defined as a YAML header.
Instead of multiplying the sector number by the default 512 bytes
boundary, append a 's' suffix. This defers the work of computing
the value to the different Actions.
The 's' suffix is chosen to be compatible with parted (ImagePartition)
and support has been added to raw action.
Signed-off-by: Julien Massot <julien.massot@collabora.com>
The community repositories were merged into extra around to years ago.
Recently the database files got cleaned up on the mirrors, causing
errors in CI. Adjust pacman.conf to remove these deprecated repositories
See https://archlinux.org/news/cleaning-up-old-repositories/ for more
details
The msdos partitioning now handles more then 4 partitions by inserting
an extended partition. To test this doesn't confuse the gpt partitioning
expand that test to more then 4 partitions as well.
Setting up the test fixtures takes quite some time, so merge the uuid5
tests into the templating tests. Also simplify it somewhat by just using
`test` rather then diff
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Add a test for partitioning an msdos label with more then 4 partitions.
The expectation is that the 4th partition will be an extended partition
in this case.
Renaming the escaping test to a general templating test and add tests
for a selection of functions from sprig-slim as well as the builtin
sector function
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Attempt to overlay a file into a directory in the filesystem which doesn't
exist. The expected behavior is to cause an error.
This test is currently a manual test case and is not hooked into the CI.
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Nothing special here - a simple test.yaml akin to the existing ones.
The pacman.conf file is effectively vanilla config that comes with the
pacman package, while the mirrorlist file is a list of UK https mirrors
that I've been using for years.
Note that there is no canonical mirror for Arch. The top-level/tier 1
Arch server should _not_ be used as per the official recommendation.
Instead we use the mirrors set in the official arch docker tooling.
v2:
- Also install archlinux-keyring and makepkg
- Use arch + backend=qemu only testing matrix
v3:
- Use the same mirrors as the Arch docker images tooling
- Build and install pacman locally, until we get an official package
v4:
- Remove the local pacman build - it's available in backports
v5:
- Explicitly pull arch-install-scripts from backports, normal one lack
pacstrap
v6:
- Manually pull the latest keyring - Debian one is outdated
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
There are various whitespace changes that can occur in json files. Use
the same pretty-format in both files to ensure the output is stable and
consistent.
Note: we need to explicitly call "bash -c" here otherwise, we'll end up
with pure POSIX shell (sh), where anonymous pipes are not a thing.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Apertis is a Debian derivative, bootstrap that to test that a non-debian
based distribution with a different codenames for release can be
successfully bootstrapped by go-debos.
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
The docker-compose test strategy was mainly done for integration with
dockerhub, but as dockerhub no longer builds our images it's not that
relevant.
What's more interesting is to use the docker container we've build to
run a selection of debos recipes, whose successfull build indicate
success. This both makes it easier to test locally as well (just run the
debos recipe) and makes the test jobs more specific.
On top of the existing test this also adds a "debian" test which does some basic
debian smoketesting (debootstrap and apt) as well as a basic
"partitioning" test. The partitioning test unforutunately doesn't work
in the nofakemachine run as udev isn't available in the container, so
that only runs on UML and Qemu based backends.
Current the kvm backend isn't tested because the standard github action
runners don't support kvm. But qemu, though being lots slower, covers
some part of it.
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
UML has some issues in some environments when stdin isn't set to
/dev/null, let's just set stdin to /dev/null for all tests.
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Currently we assume all of the tests are run without fakemachine;
since we are looking to run the tests with fakemachine as well,
let's allow arguments to be passed to the test script which are
then passed to debos.
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>