export BLUEPRINTS_DIR for use in tests
Depending on the way the tests are run the directory may be a temporary
dir, or it may be the standard /var/lib/lorax/... path.
Related: rhbz#1749802
Skipping because:
larsu: I get `open failed: administratively prohibited: open failed`
larsu: ssh somehow disallows making a side channel for the forward
larsu: there's an option that controls it, but it's set to "yes"
larsu: I've straced the sshd, with no luck coming closer
We'll deal with this later, possibly together with the rest of
the skipped test cases.
Related: rhbz#1698366
- these files are executed under Python 3 while the linter
is Python 2 for RHEL 7 so we just ingore them
- also reverts the changes introduced to make these files Py2
compatible, making them the same as on master branch
Related: rhbz#1698366
this will report failing status in CI in case we have the
'Ran 0 tests in 46.486s' scenario.
Note: the check is placed after runner.run() to present the
message shown above which should make it more clear what went on.
Related: rhbz#1698366
0 run
The docker phase always failed because `-ti` was passed even though the
the output was not a terminal. Moreover docker service isn't running by
default on RHEL-7, so it's necessary to start it first explicitly.
Related: rhbz#1720224
These are used when running tests, so catch-up with changes in lorax.
Includes adding rootfs-size, extra kernel args, and using locking to
prevent temporary files from being deleted by systemd tmpfiles handling.
Related: rhbz#1668520
Related: rhbz#1715116
Related: rhbz#1689314
Because anaconda --dirinstall is used the kickstart's network like isn't
processed at all. So we need to remove the NetworkManager-server-config
package which disables networking.
Resolves: rhbz#1710877
It's necessary to make sure the blueprints directory doesn't contain
the git/ directory before the tests are run, so that we can just simply
modify the blueprint files without using blueprints push.
Related: rhbz#1698366
`setup_tests()` expected BLUEPRINTS_DIR to be set, but it wasn't when
running in automated mode (with $CLI set).
Fix this and move share and blueprint dirs to function arguments.
Related: rhbz#1698366
the version coming from RPM is older and prevents installing
ansible[azure] via pip. OTOH removing with yum also removes
lorax-composer and breaks tests when running against the RPM
instead of git checkout (which will be the default with Cockpit CI).
Related: rhbz#1715003
If a repository has `sslcacert`, `sslclientcert`, or `ssclientkey` set,
pass them to anaconda through the kickstart file. This is mostly the
case when using RHEL repositories that are accessed through a
subscription.
Resolves: rhbz#1701033
- verify SemVer .patch number will be automatically updated when
we push the blueprint a second time without changing version
- verify show displays the content in TOML format and it matches
what is on disk. Because of that also start with empty packages
and groups fields in the initial toml. If they are missing they
will be added automatically by lorax-composer and this simplifies
the test
- verify delete works
Related: rhbz#1698366
Make sure this is really fixed by running the template tests with both
variations. NOTE: [customizations] is the correct form. An early
documentation bug led to both being accepted.
Related: rhbz#1688335
This fixes the customizations list problem earlier than in
add_customizations.
In the recipe it should be [customizations] not [[customizations]]
which creates a list. If it was used that way grab the first element and
replace the list with it.
Related: rhbz#1688335
This allows iso builds to include the extra kernel boot parameters by
passing them to the arch-specific live/*tmpl template.
Also adds tests to make sure it is written to config.toml in the build
metadata.
Resolves: rhbz#1688335
Sometimes it is necessary to modify the kernel command-line of the
image, this adds support for a [customizations.kernel] section to the
blueprint:
[customizations.kernel]
append = "nosmt=force"
This will be appended to the kickstart's bootloader --append argument.
Includes tests for modifying the bootloader line, the kickstart
template, and examining the final-kickstart.ks created for a compose.
Related: rhbz#1688335
Reading a blueprint wasn't checking to see if it had been deleted so it
was returning the most recent commit before it had been deleted. This
allowed things like starting a compose with a blueprint that technically
doesn't exist.
One exception to this is the /changes/ route, it must be available so
that you can use the commit hash to undo a delete.
This also adds tests for the various operations.
(cherry picked from commit d32f477e0b)
Resolves: rhbz#1683442