This tests the routes for saving a profile, listing profiles, deleting
profiles, as well as composing with upload.
The composes run fake composes with upload data, one selects a profile
the other passes in the settings. No actual upload is done, but it tests
that the info, log, and cancel routes work.
This also updates the test setup to copy over the share/lifted directory
so that the providers are available to the tests.
This allows deleting a provider's profile. Pass the provider and profile
name like:
/api/v1/upload/providers/delete/azure/test-settings
A standard json response will be returned.
This extends the /compose/ route to support uploading with either an
existing profile, or with one-time use settings passed in the POST.
To select a profile include the provider and profile, as returned by
`/uploads/providers`:
"upload": {
"image_name": "My Image",
"provider": "azure",
"profile": "production-azure-settings"
}
Output from some of these are different from API v0. Instead of mixing
the two this moved v1 tests into a new class - ServerAPIV1TestCase to
make them easier to maintain, and removes the v1 tests from
ServerAPIV0TestCase
uploads should only be included in the V1 API routes, add `api`
selection to the relevant helper functions and calls to them from v0.py
Add new V1 routes with api=1 to include the uploads information in the
results.
Also add tests to ensure that V0 requests do not include uploads.
Currently, Azure, vSphere, and OpenStack are supported. See
https://github.com/weldr/lorax/pull/826 for more details about this new
feature.
I've called the upload library "lifted" as a reference to Seuss'
The Lorax -- in the book, the Lorax lifts himself up by the seat of his
pants through a hole in the smog clouds, and they start calling him the
"Lifted Lorax."
This adds new features to the /compose route under API v1
* If `$COCKPIT_BOTS_REF` is set, check out that bots version instead of
master.
* Use git cache in $XDG_CACHE_HOME if available. Our CI uses that to
save downloads, and it does not get in the way for local developers.
Adapted from https://github.com/cockpit-project/starter-kit/pull/233
Commit 4643afa58 was a thinko -- for our CI we *don't* want our test to
clobber a pre-existing bots/ checkout, as we often use this to run tests
against an updated image or to validate a changes to the bots project.
On developer machines, bots may also be a symlink to an actual bots
directory in development, so don't clobber that.
Stop making "bots" a phony target, and drop the now unnecessary
`[ -d bots ]` check.
Adapted from https://github.com/cockpit-project/starter-kit/pull/232
A recipe that is valid TOML can still be an invalid recipe (eg. missing
the 'name' field) so this should also catch RecipeError.
Also added tests for this, as well as making sure commit_recipe_file()
raises the correct errors.
Resolves: rhbz#1755068
Anaconda uses zram to allow installation on low memory systems.
We used to have a custom script called "zram-stats", that can be
used to test and debug zram usage during installation.
The script no longer works & zramctl now provides much better
output than our script ever did. So we decided to decommission
the old Anaconda provided script & use zramctl instead.
So change the cleanup rule in the Lorax boot.iso template
to keep the zramctl utility.
Related: rhbz#1561773
- save compose logs under /var/log/$TEST
- save qemu logs under /var/log/$TEST/qemu.log
- download everything to $TEST_ATTACHMENTS so it can be saved
in CI results
Add dmsquash-live-ntfs to the default dracut modules in livecd builds.
The omission of this is probably why:
https://bugzilla.redhat.com/show_bug.cgi?id=1449410
didn't work out as intended (I suspect it was closed unfixed).
Without this, initramfs winds up with the ntfs-3g tools lying
around, but no hooks cause them to actually get used.
AFAICT, this is a legit bugfix, not a "proposed enhancement"
so to speak. To test that this actually fixed the problem (well,
/a/ problem, at least), I used some scripts:
https://github.com/gmt/test-respin-fedora-ntfsable-iso
Signed-off-by: Greg Turner <gmt@be-evil.net>
Signed-off-by: Brian C. Lane <bcl@redhat.com>
tests: 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#1714103
This loads the system dnf vars from /etc/dnf/vars at startup if
system repos are enabled, and it substitutes the values in the sources
when loaded, and when a new source is added.
Also includes tests.
This new setting for 'find_multipaths' tries to prevent things like
LVM from going ahead and activating LVM on the individual disks/paths
until there is reasonable certainty (via a timeout) that the device
is not a component of a multipath set.
NOTE: 'smart' is supported by device-mapper-multipath v0.7.7 and later.
This changes the source 'name' field to match the DNF usage of it as a
descriptive string. 'id' is now used as the short name to refer to the
source. The v0 API remains unchanged.
Tests for v1 behavior have been added.
Now that the v1 API is in use the status message will return api: 1