Commit Graph

2255 Commits

Author SHA1 Message Date
Brian C. Lane fcd2d39860 docs: Add anaconda-live to fedora-livemedia.ks example 2019-07-29 13:21:25 -07:00
Brian C. Lane 1796489839 livemedia-creator: Use make_runtime for all runtime creation 2019-07-29 13:21:25 -07:00
Brian C. Lane cb91fa3c78 livemedia-creator: Add support for a squashfs only runtime image
Normally the runtime image is an ext4 filesystem image that is
compressed with squashfs. dracut now supports setting up an overlayfs
when it detects a bare filesystem tree inside the squashfs.

This commit adds support for a --squashfs-only option which places the
root tree directly in the squashfs.img
2019-07-29 13:21:25 -07:00
Alexander Todorov cf10fb40f3 Update rst formatting. Refs #815 2019-07-26 13:55:54 -07:00
Dan Horák 9f9cba35a2 don't skip Xorg packages on s390x to allow local GUI installation under KVM 2019-07-25 08:49:14 -07:00
Brian C. Lane 0708302464 Use binary mode to tail the file
In python 3 f.seek() on text doesn't work like it does in py2/C because
text is now unicode. So change read_tail to use byte mode and take
unicode into account. Also add tests for it.
2019-07-11 15:16:41 -07:00
Evan Goode 90626f97b6 Return most relevant log file from /compose/log
Return anaconda.log if anaconda is running, composer otherwise

Return packaging.log if it's at least 15s newer than anaconda.log
2019-07-11 15:16:41 -07:00
Jiri Kortus 9bf8d8a2fc Use passwd --status for locked root account check 2019-07-11 12:47:18 +03:00
Brian C. Lane 3cb007a25b tests: Use liveuser account for live-iso boot check
On rawhide you cannot ssh in as root without changing PermitRootLogin,
and really we should be testing that liveuser can login not root.
2019-07-11 11:47:11 +03:00
Evan Goode d496da00d9 Mention python3-magic in HACKING.md 2019-07-10 15:47:36 -07:00
Brian C. Lane d0e947fe3b tests: Add check to make sure the compose actually finished
Previously it was looping, waiting for FINISHED|FAILED but was not
actually failing the test if the compose failed to build.
This adds a function to check the status of the compose and calls it
after each compose.
2019-07-10 08:58:24 -07:00
Alexander Todorov 197c326530 test: check the number of tests that ran
Fail if the number of excuted tests != number of dicovered tests.
2019-07-10 09:18:36 +02:00
Pat Riehecky 2c141950b0 lorax: Add debug log of command line options 2019-07-09 17:22:27 -07:00
Pat Riehecky 1f811523b5 lorax: provide runtime lorax config in debug log 2019-07-09 17:20:39 -07:00
Jacob Kozol 6b55c8f8f0 Remove whitespace in v0_blueprints_new 2019-07-09 22:53:51 +02:00
Jacob Kozol 38f1edd2aa Add test for VALID_BLUEPRINT_NAME check
Blueprint names can only contain alphanumeric characters and the characters: ._-. This test checks that an api request to create a blueprint with invalid characters in its name will return an InvalidChars error.
2019-07-09 22:53:51 +02:00
Jacob Kozol 4174186c14 Add seperate validation for blueprint names
The VALID_API_STRING function allows for characters that should not be
allowed in blueprint names. VALID_BLUEPRINT_NAME allows us to
specifically check if a blueprint contains a valid name.
2019-07-09 22:53:51 +02:00
Pat Riehecky e11fc2037f Leave lscpu in the image for additional debugging 2019-07-09 11:42:23 -07:00
Lars Karlitski fd57e1106e tests: set skip_if_unavailable in test repos
dnf seems to have changed the default for skip_if_unavailable. Some
mock repositories are still around in later tests, which then fail
because metadata cannot be synced.

Also expose skip_if_unavailable in dnf_repo_to_file_repo(), so that
tests checking for equality of repo files continue to pass.
2019-07-09 00:23:33 +02:00
Lars Karlitski fce196ad4a test/README.md: Add section explaining GitHub integration 2019-07-03 16:51:37 +02:00
Brian C. Lane dc98837667 Automatic commit of package [lorax] release [31.8-1].
Created by command:

/bin/tito tag
2019-06-28 10:53:28 -07:00
Bastien Nocera eb7f528071 Also search for pxeboot kernel and initrd pairs
As used in the Fedora 30 aarch64 Server DVDs.

Closes: #786
2019-06-28 10:38:38 -07:00
Evan Goode 998d0140be Assert that RuntimeErrors have correct messages 2019-06-28 08:55:36 -07:00
Evan Goode fef76930bc More descriptive error for a bad ref in repos.git
Fixes #771
2019-06-28 08:55:36 -07:00
Alexander Todorov e70aae69da Remove unused shell script
the file is not used anywhere, nor is the findtestfiles() function
defined inside of it.
2019-06-28 11:23:31 +03:00
Lars Karlitski f810924042 test: Output results for cockpit's log.html
Cockpit's log.html has a peculiar format, but parsing logs in html is
much easier, because it shows expandable sections for each test.
2019-06-25 23:50:16 +02:00
Alexander Todorov e947e01331 Do not generate journal.xml from beakerlib
bacause this requires additional Python modules and we don't
really use it! Fixes
[ WARNING  ] :: cannot create journal.xml due to missing python interpreter
2019-06-25 14:38:59 +02:00
Brian C. Lane 7ff4d7ac9e tests: Add RUN_TESTS to Makefile so you can pass in targets
Also add a test_cli target to run things like the blueprint cli tests.
Run this like so:

RUN_TESTS="ci test_cli" make test-in-docker

If nothing is passed it will run the "ci" target.
2019-06-25 14:13:53 +02:00
Brian C. Lane f1733369fa tests: Add tests for recipe checking functions 2019-06-25 11:44:58 +02:00
Brian C. Lane 13a7dcf2b1 lorax-composer: Add basic case check to check_recipe_dict
This will detect if an expected field is not all lower case as is
required.
2019-06-25 11:44:58 +02:00
Brian C. Lane 61059a2699 lorax-composer: Add basic recipe checker function
This makes sure that required fields are included, and that sections are
not empty. It does not check for all optional fields.

If there are errors it will gather up all of them and then raise a
RecipeError with a string of all the errors.
2019-06-25 11:44:58 +02:00
Lars Karlitski bad9e93c3c
Revert "test: Disable test_live_iso test"
Enable the live-iso test again.

This reverts commit 1ac75e98b4.

Fixes: #731
2019-06-25 10:24:51 +02:00
Lars Karlitski 61fc4d2b4e test: Fix test_blueprint_sanity
The new toml library, introduced with abe7df34f, outputs different
whitespace from the old one. Fix the test expectation and strip()
results from toml.dumps(), because it contains superfluous newlines at
the end.
2019-06-24 23:43:08 +02:00
Brian C. Lane 682f8a9295 tests: rpm now returns str, drop decode() call 2019-06-24 20:15:21 +02:00
Brian C. Lane e7ce7cda72 tests: Drop libgit2 install from koji 2019-06-24 20:15:21 +02:00
Brian C. Lane c1aa57022b Automatic commit of package [lorax] release [31.7-1].
Created by command:

/bin/tito tag
2019-06-18 15:09:32 -07:00
Brian C. Lane f0992bc649 New lorax documentation - 31.7 2019-06-18 15:02:04 -07:00
Brian C. Lane fb89e6f275 Update qemu arguments to work correctly with nographic
Add -monitor none to turn off the qemu monitor multiplexing.
Pass -boot d for -cdrom booting instead of 'c'.

Add 'console=ttyS0,115200n8' to the boot arguments so that kernel output
will show up on the serial port.
2019-06-18 14:28:58 -07:00
Brian C. Lane abe7df34fc Switch to new toml library
The previous library, pytoml from https://github.com/avakar/pytoml is no
longer supported. So this adds a compatibility layer on top of the
suggested replacement, toml from https://github.com/uiri/toml
2019-06-18 14:01:15 -07:00
Brian C. Lane 932ff5812c composer-cli: Update diff support for customizations and repos.git
composer-cli will now output information about changes to customizations
entries and the repos.git entries.
2019-06-13 14:16:48 -07:00
Brian C. Lane 9011a564e8 Add support for customizations and repos.git to /blueprints/diff/
This also includes extensive tests for each of the currently supported
customizations. It should be generic enough to continue working as long
as the list of dicts includes a 'name' or 'user' field in the dict.
Otherwise support for a new dict key will need to be added to the
customizations_diff function.
2019-06-13 14:16:48 -07:00
Brian C. Lane 316257fbc0 tests: Update custom-base with customizations 2019-06-13 14:16:48 -07:00
Brian C. Lane ffc3432cf2 Move the v0 API documentation into the functions 2019-06-13 11:28:57 -07:00
Brian C. Lane 6d50a5874e Update the /api/v0/ route handling to use the flask_blueprints Blueprint class
Instead of setting up the routes inside a function we can now use a
BlueprintSkip class, which allows us to register them at different
routes (eg. /api/v0/ and /api/v1/) and override any routes that will be
replaced by the new API version.
2019-06-13 11:28:57 -07:00
Brian C. Lane 7071e62985 Extend Flask Blueprint class to allow skipping routes
When adding a new API we want to use the old code for any routes that
aren't being overridden.

This modifies the Flask Blueprint class so that a skip_rules list can be
passed to server.register_blueprint()
2019-06-13 11:28:57 -07:00
Alexander Todorov f64fe0f1f3 Remove PR template 2019-06-12 10:05:23 +02:00
Alexander Todorov f61dfcc2c7 Increase retry count/sleep times when waiting for lorax to start
the biggest slow down is fetching data for many repositories
over a slow network. The previous retry count and sleep times
sometimes are not enough on Fedora.
2019-06-10 13:26:11 +03:00
Alexander Todorov 688f70eefa Revert "remove the check for qemu-kvm"
Partially reverts commit 303a69bcbd.
2019-06-10 13:26:11 +03:00
Alexander Todorov 22b0eb28bc Revert "remove the check for /usr/bin/docker in the setup phase"
this is still helpful when executing these test scripts manually
outside Cockpit CI or in Jenkins (for gating).

Partially reverts commit 5f5a2d5337.
2019-06-10 13:26:11 +03:00
Alexander Todorov b725eb141a [tests] Define unbound variables in test scripts 2019-06-06 14:56:40 +02:00