Commit Graph

19 Commits

Author SHA1 Message Date
Brian C. Lane
730621808c composer-cli: Add support for start-ostree --url URL
Some ostree builds, like edge, require passing a url to it along with
the ref and parent arguments. This adds an optional --url argument to
the 'composer-cli compose start-ostree' command.

Resolves: rhbz#1929381
2021-03-03 16:24:07 -08:00
Brian C. Lane
468f651af4 tests: Update composer-cli blueprint server tests
I removed the example blueprints, and this is now going to run against
osbuild-composer which doesn't have default blueprints installed. So
embed them into the test and push them as the first test.

Also note that osbuild-composer diff currently has a bug, you cannot
specify a commit hash, so mark the final diff test failure as expected
for now.
2020-10-07 10:48:43 -07:00
Brian C. Lane
7616a10373 Remove lorax-composer, it has been replaced by osbuild-composer
Remove the code, related files, and tests.
2020-09-30 15:42:46 -07:00
Brian C. Lane
b7e69596e3 composer-cli: Make start-ostree parent and ref optional
This changes the start-ostree command to:

compose start-ostree [--size XXXX] [--parent PARENT] [--ref REF] <BLUEPRINT> <TYPE> [<IMAGE-NAME> <PROFILE.TOML>]

Both of them are optional, and if missing a "" is passed to
osbuild-composer. Also adds more tests for all the various possible
options and removes the provider and profile arguments.
2020-07-23 10:35:10 -07:00
Brian C. Lane
d830829929 composer-cli: Add a get_arg function
This is in preperation for adding more optional arguments. Adds a
generic get_arg function, tests for it, and converts get_size to use it.
2020-07-23 10:35:10 -07:00
Brian C. Lane
bf1be846e5 composer-cli: Return a better error with no value
And add tests for the get_size function.
2020-06-11 09:36:32 -07:00
Brian C. Lane
9a17eba974 tests: Add tests for composer-cli compose start JSON POST 2020-06-11 09:36:32 -07:00
Brian C. Lane
0d3cff0dde ltmpl: Update to use collections.abc 2020-01-15 10:40:17 -08:00
Jakub Rusz
f52e56c628 tests: fix blueprints tag test
This changes the blueprint tested from glusterfs to example-http-server
2019-11-18 08:41:55 -08:00
Brian C. Lane
fad9b324f7 composer-cli: Return int from handle_api_result not bool
The callers, and the documentation, all expect int 0/1 to use as the
exit status for the program. Not True/False, even though that works most
of the time.
2019-11-14 11:58:56 -08: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
2272b2b189 Update bash to 5.0.*
so that the tests will pass again on rawhide.
2019-02-21 08:55:23 -08:00
Brian C. Lane
972b5c4142 Add tests for limit=0 routes
Passing ?limit=0 to the blueprints/list, blueprints/changes,
projects/list, modules/list should always return the total possible
results, not 0.

Also move the composer-cli test_diff to the end so that it will work
consistently. Do this by naming it test_z_diff.
2018-08-27 11:05:46 -07:00
Brian C. Lane
4e32026354 Fix tests related to blueprint name changes 2018-08-23 13:32:26 -07:00
Chris Lumens
fb9e5c4a2b Fix more tests.
These were broken due to me rebasing before sending a PR off.  They
should work now.

(cherry picked from commit 4cb15e0a0f)
2018-08-09 16:20:29 -04:00
Brian C. Lane
18b03936c2 Add composer-cli function tests
These depend on there being a freshly installed lorax-composer API
server running, if there is no /run/weldr/api.socket they will be
skipped.

(cherry picked from commit 7700ae3135)
2018-08-06 16:53:56 -07:00
Brian C. Lane
2ce3752f90 Add a test library
This adds empty __init__.py to tests so that a lib.py library of helper
functions can be imported from the tests.

Add captured_output to use with composer-cli tests to capture stdout/err
output from the functions.

(cherry picked from commit eeae331ba0)
2018-08-06 16:53:48 -07:00
Brian C. Lane
08c2965fab Modify handle_api_result so it can be used in more places
Some results have errors and no status, others have status and errors.
Update the function to return the final rc to exit with, and a bool
indicating whether or not to continue processing the other fields.

Add a bunch of tests for the new function to make sure I have the logic
correct.

(cherry picked from commit 35fa067219)
2018-08-06 16:52:28 -07:00
Brian C. Lane
825d1931e4 Add composer-cli and tests 2018-05-14 13:00:15 -07:00