Commit Graph

20 Commits

Author SHA1 Message Date
Brian C. Lane
afa89ea657 Fix DNF related issues with source selection
DNF Repo.dump() function cannot be used as a .repo file for dnf due to
it writing baseurl and gpgkey as a list instead of a string. Add a new
function to write this in the correct format, and limited to the fields
we use.

Add a test for the new function.

Fix /projects/source/info to return an error 400 if a nonexistant TOML
source is requested. If JSON is used the error is part of the standard
response.

Update test_server.py to check for the correct error code.
2018-06-04 15:45:36 -07:00
Brian C. Lane
dd8e4d9e99 Fix handling bad source repos and add a test
When adding a source failed it wasn't being removed from the dnf object.
This fixes that, and returns an error when setting up the source fails.
Also adds a test for it.
This also includes detecting rawhide vs. non-rawhide releases and
adjusting the tests accordingly (some of the source names change).
2018-06-04 15:45:36 -07:00
Brian C. Lane
666d7f1e03 Speed up test_dnfbase.py
Calling get_base_object is no longer needed, this speeds things up by
not unnecessarily downloading metadata.
2018-06-04 15:45:36 -07:00
Brian C. Lane
1034cfd9a7 Make sure new sources show up in the source/list output
Also remove an unneeded makedirs from test_server.py
2018-06-04 15:45:36 -07:00
Brian C. Lane
22070dcf42 Update test_server for rawhide
The system repo is 'rawhide' and the 'fedora' and 'updates' repos are
disabled.
2018-06-04 15:45:36 -07:00
Brian C. Lane
6d677b2207 Add support for user defined package sources API
This lives under /api/v0/projects/source/*

See the documentation for details
2018-06-04 15:45:36 -07:00
Brian C. Lane
095829171a Add support for version globs to blueprints
This uses dnf's version__glob filter to implement it. It amounts to '*'
wildcards and '?' for single character matching.
2018-05-18 12:03:26 -07:00
Brian C. Lane
d406fbdf83 Update atlas blueprint 2018-05-18 11:26:04 -07:00
Brian C. Lane
a363aee971 Skip creating groups with the same name as a user
Otherwise the user creation fails when anaconda sees there is already a
group with that name. Log a warning and continue on.
2018-05-14 13:00:15 -07:00
Brian C. Lane
07ea61be77 Add user and group creation to blueprint
[[customize.user]] and [[customize.group]]
2018-05-14 13:00:15 -07:00
Brian C. Lane
25bec0b50d Add blueprint customization support for hostname and ssh key
This adds support for the optional blueprint section [customizations].

Use it like this:

[customizations]
hostname = yourhostnamehere

[[customiations.sshkey]]
user = root
key = root user key
2018-05-14 13:00:15 -07:00
Brian C. Lane
5c25f98db7 Update test_server for blueprint and Yum to DNF changes. 2018-05-14 13:00:15 -07:00
Brian C. Lane
0a3e6598b2 Update the test blueprints
Change versions to match Fedora versions. Add version numbers to the
blueprints except for glusterfs.toml, not having a version is used as
part of the tests.
2018-05-14 13:00:15 -07:00
Brian C. Lane
9b9b627fe5 Update pylorax.api.projects for DNF usage
And adjust tests to match.
2018-05-14 13:00:14 -07:00
Brian C. Lane
e86f4f9a36 Update dnfbase (formerly yumbase) for DNF support
And adjust tests to match.
2018-05-14 13:00:14 -07:00
Brian C. Lane
454c74035c Update dnfbase tests 2018-05-14 13:00:14 -07:00
Brian C. Lane
d31bea7bd3 Use 2to3 to convert the python2 lorax-composer code to python3 2018-05-14 13:00:14 -07:00
Brian C. Lane
4a91936dd2 Add the tests from lorax-composer branch
These currently fail for several reasons and will be adjusted as the
code it ported to this branch.
2018-05-14 13:00:14 -07:00
Brian C. Lane
dc635a97f6 Write the --variant string to .buildstamp as 'Variant=' 2018-01-17 09:38:16 -08:00
Alexander Todorov
fe461f480e Add first unit test so we can start collecting coverage 2017-10-13 18:58:17 +03:00