Add quick README about testing

This commit is contained in:
Alexander Todorov 2020-02-19 10:56:38 +02:00 committed by Tom Gundersen
parent 90bf26cc4b
commit defc34b7f0
2 changed files with 34 additions and 0 deletions

View file

@ -55,3 +55,8 @@ Please refer to the [lorax-composer](https://github.com/weldr/lorax)'s documenat
### Upload action
* Each image can be, but does not have to be, uploaded to a remote location
* One image can be uploaded to multiple locations
## Testing
See [test/README.md](test/README.md)

29
test/README.md Normal file
View file

@ -0,0 +1,29 @@
# osbuild-composer testing information
## Integration testing
This will consume the osbuild-composer API surface via the `composer-cli`
command line interface. Implementation is under `cmd/osbuild-tests/`.
The easiest way to get started with integration testing from a git
checkout is:
* `make rpm` to build the software under test
* `dnf install output/x86_64/golang-github-osbuild-composer-*.rpm` - this will
install both osbuild-composer, its -debuginfo, -debugsource and -tests packages
* `systemctl start osbuild-composer`
* `/usr/libexec/tests/osbuild-composer/osbuild-tests` to execute the test suite.
It is best that you use a fresh system for installing and running the tests!
**NOTE:**
The easiest way to start osbuild-composer is via systemd because it takes care
of setting up the UNIX socket for the API server.
If you are working on a pull request that adds more integration tests
(without modifying osbuild-composer itself) then you can execute the test suite
from the local directory without installing it:
* `make build` - will build everything under `cmd/`
* `./osbuild-tests` - will execute the freshly built integration test suite