Commit Graph

21 Commits

Author SHA1 Message Date
Alexander Todorov
7b08fa8838 tests: Do not rely on example blueprints
- avoids having to modify them in the first place so less changes
  to the SUT
- will help with transition to osbuild-composer backend
- each test which needs a blueprint either declares it on its own
  (some already do this) or may use a shared blueprints from the
  tests lib dir
2020-07-23 10:20:47 -07:00
Alexander Todorov
14a3c8d5a7 tests: Use BACKEND env variable instead of hard-coded values
- default BACKEND to lorax-composer
- pass BACKEND everywhere we need to
2020-07-23 10:20:47 -07:00
Jakub Rusz
67410a9770 tests: run ssh commands in batch mode 2020-01-24 14:27:31 +02:00
Alexander Todorov
2b578dcee8 tests: Ensure failure if beakerlib results file not found
In example here
https://209.132.184.41:8493/logs/pull-887-20191025-100505-509b9eae-weldr-lorax--fedora-31-tar/log.html

we're seeing stuff like:
/tests/test_cli.sh: line 109: /tmp/composer-test.wIAITH/TestResults: No such file or directory

but the result is PASS
2019-11-05 19:05:33 +02:00
Alexander Todorov
b197e448ff DRY when setting up, running & parsing results for beakerlib tests 2019-11-05 19:05:33 +02:00
Brian C. Lane
89539a7bf4 tests: Use journalctl -g to check for failed login
/var/log/audit/audit.log isn't always available (eg. tar liveimg
install), but it is logged to the journal, which can be grepped with
'journalctl -g' so use that instead.
2019-11-01 09:00:57 -07:00
Brian C. Lane
454af0c5d5 tests: Fix check_root_account when used with tar liveimg test
passwd and openssh-clients need to be installed, and there is no need to
use sudo when you are connecting to the system as root.
2019-11-01 09:00:57 -07:00
Alexander Todorov
d67745d755 tests: Use the same asserts as before
after the changes around live-iso and qcow2 test cases the asserts
used have also changed. This commit utilizes the existing test lib.
2019-11-01 09:00:57 -07:00
Brian C. Lane
a0ae10c2d7 tests: Use --http0.9 for curl ssh test 2019-11-01 09:00:57 -07:00
Jiri Kortus
f978d4b01c [tests] Use functions for starting and stopping lorax-composer 2019-09-24 12:50:19 +03:00
Alexander Todorov
8af9723c37 [tests] Collect compose logs after each build
- 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
2019-09-13 12:16:22 +03:00
Jiri Kortus
836f0ddf7a [tests] Use a function to wait for compose to finish
The function is meant to replace the duplicate pieces of code used in various
tests, the polling interval is unified to 20 seconds.
2019-09-13 12:16:22 +03:00
Jiri Kortus
562eb0a15d tests: add option to disable kernel command line parameters check 2019-09-09 09:28:52 +02:00
Brian C. Lane
beff4f6967 tests: Use a loop to wait for VM and sshd to start 2019-09-09 09:28:52 +02:00
Jiri Kortus
9bf8d8a2fc Use passwd --status for locked root account check 2019-07-11 12:47:18 +03: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
Lars Karlitski
42c7c0691c Monkey-patch beakerlib to fail on first assert
Beakerlib upstream can't do this yet, but might at some point:

https://github.com/beakerlib/beakerlib/issues/42

This is only enabled in combination with the `--sit` option of the
`test/check-*` scripts. It leaves the system in exacly the state it was
in when an assertion failed. Finishing the test run would run cleanup as
well (such as deleting created images). It also takes longer.
2019-06-04 20:12:54 +02:00
Jiri Kortus
123b5c269d Add test for passing custom option on kernel command line 2019-05-07 12:36:32 +03:00
Jiri Kortus
596cba2255 Use verify_image function as a helper for generic tests 2019-05-07 12:36:32 +03:00
Jiri Kortus
209bdd6911 Fixes for locked root account test
Fixes related to a few issues in the locked root account test I somehow
managed to overlook in the initial commit.
2019-04-09 18:53:15 +03:00
Jiri Kortus
655e7e40c0 Add checks for disabled root account
The root account checks are applied to generated and deployed images
to make sure that root account is locked, except for live ISO.
2019-03-22 12:06:34 +02:00