Run tests in a vagrant session (w/libvirt for now). This allows
the tests to occur similar to the way our jenkins tests work. Run
make vagrant-check and we created an F24 session and install
the proper deps. We then call the .redhat-ci.sh script inside
the vagrant session and the tests are executed. At this time, you
will need to vagrant halt to shutdown the session when comlete.
By default, the tests will exeute on an instance of fedora-24-atomic.
You can test on Colin's CAHC centos-atomic by:
make vagrant-check BOX=centos_atomic
Closes: #736
Approved by: rhatdan
Making several changes to allow for more granular testing with make
check.
You can still run a granular INTEGRATION test with the TEST_INTEGRATION
keyword followed by the name (excluding test and .sh). For example,
TEST_INTEGRATION=top ./test.sh
This will only run the top integration test. We then do NOT run any of
the UNIT tests as it is assumed that the developer only wants to test
the specific integration test.
You can now test a singular UNIT test with the TEST_UNIT keyword. Like
the integration test, simply name the test and exclude the prefixed
"test_" and file suffix of ".py" For example,
TEST_UNIT=discovery ./test.sh
This will only run the discovery unit test; the pylint test and integration
tests will be skipped.
Closes: #728
Approved by: rhatdan
In code paths with Python 3, when dealing with remote registries,
we find that under certain conditions values are set as bytes which
need to be encoded/decoded to work properly with things like json
and ord().
Closes: #747
Approved by: rhatdan
When walking the layers of an image in atomic verify, we need to be sure
we use a fq image name when probing. In cases where the tagging includes
a non-fq image name, we were not. This resolves Bugzilla 1377952.
Closes: #744
Approved by: baude
When using the dbus interface to perform a scan, self.options
was being set to None. This tripped a condition with the
setting of args where it could not be iterated. We now ensure
self.options is not None prior to the iteration.
Closes: #743
Approved by: rhatdan
The previous change where we removed the tag from the write
file location impacted the signing because the tag was also
being omitted. This ensures the tag is omitted from the file
path but included in the call skopeo standalone-sign.
Closes: #741
Approved by: rhatdan
Now that the backend has support for frequent, up-to-date CAHC images,
we can make use of it here and avoid a rebase and a reboot.
Closes: #739
Approved by: cgwalters
The manifests produced by Atomic were incorrect resulting in
an incorrect hash being used to sign. This also resulted in
the signature path being incorrect. Contributing to the failure
was the json serialization which is now not used.
Closes: #737
Approved by: rhatdan
Rename atomic_client to atomic_dbus_client, so it is easier to understand.
Cleanup a couple of errors causin dbus to break.
Closes: #732
Approved by: rhatdan
1. Decode gpg2 output as UTF-8.
2. Use startswith() and require ':' to be more strict.
3. Handle older gpg2 outputs in which the User-ID is part of the 'pub'
line.
Closes: #724
Approved by: rhatdan
older gobject-introspection versions convert these objects to an array
instead of a dictionary. Add a workaround for both versions of it.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #724
Approved by: rhatdan
Make use of the new support for multiple testsuites in Red Hat CI. As a
start, we test on Fedora 24 Atomic Host, Fedora 24 Cloud, and CentOS
Continuous.
Closes: #724
Approved by: rhatdan
When determining if a registry name is a registry name, you have to strip
the port or it will fail. For example:
```
python -c 'from Atomic.util import Decompose; print(Decompose("localhost:5000/somethingibuilt:latest").all)'
('', 'localhost:5000', 'somethingibuilt', 'latest', '')
```
Note how the localhost:5000 ends up in the repo "field". With this fix:
```
python -c 'from Atomic.util import Decompose; print(Decompose("localhost:5000/somethingibuilt:latest").all)'
('localhost:5000', '', 'somethingibuilt', 'latest', '')
```
Now ends up in the registry field.
Closes: #729
Approved by: baude
In cases where the input name is not fully-qualified and
the local image is tagged more than once, we iterate repotags
in an attempt to figure out the fq name. If this fails, we
raise a ValueError like before.
Closes: #718
Approved by: rhatdan