Fix test failures after updating papr to test with f26 atomic/cloud
images instead of f25, with the following changes:
1. Remove dependency on docker hub tester image. Instead, mimic
what ostree/rpm-ostree does and use a recursive .papr.sh script
to install the necessary packages to the base f26 image in the
fedora registry. This fixes tests on the atomic host since python3.6
is being used, and prevents future tests from testing the wrong
version. (Note this is slightly slower due to having to install
packages during the test rather than using a pre-built image).
2. Fix some pylint errors, and mask others for now
3. Fix failing integration tests due to inter-test interference
4. Remove unnecessary deepcopy in container filter
5. Add compatibility for both c-s-s and d-s-s in storage
6. Update expected sha256 values for dockertar test
Remaining issues:
1. test_storage should possibly be reworked. The current test
setup is conflicting with the new default of overlay as a driver.
For now, the test for generated d-s-s is disabled.
2. some storage commands are still using "docker-storage-setup"
instead of "container-storage-setup". There is a backward
compatible check in place that should be reworked in the future
3. some masked pylint errors should be further investigated
4. keep the dockerfile for the project atomic tester image for now
(bump to 26), since its a little easier and faster to set up with
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #1076
Approved by: baude
Add the image atomic-system-containers-update, which has
'atomic.type'=system, a newer runc spec, and different
environment variables, including one without a default value.
Used for refactored system container tests, namely for
install and update --rebase.
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #983
Approved by: giuseppe
When installing an image, we now write a small bit of json
to /var/lib/atomic/install.json. The json format is:
{
<image_name>: {
id: <image_id>,
install_date: <install_date_in_utc
}
}
This will be used in update, run, etc to ensure that any image
with an INSTALL label is first installed.
Closes: #950
Approved by: giuseppe
Define the methodology for testing dbus in integrations tests. Using a decorator,
this allows us to automatically define and test dbus tests. This is only the base
test to exercise the testing.
Closes: #901
Approved by: rhatdan
Small reorganization for some of the dockerfiles related to
image-test which lets docker use more efficient caches to
build quicker.
Closes: #850
Approved by: baude
Adding summary build time for each test image. This is somewhat
in preparation to hopefully being able to reduce the build times
for the images.
Closes: #850
Approved by: baude
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
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
Only run atomic under coverage if it's installed. This will allow the
testsuite to be run on Atomic Host.
Also allow passing the $PYTHON env var to specify which python
executable to use when running the test. It was implicitly using the
same Python as the one for coverage before, which was most always py2.
Closes: #684
Approved by: cgwalters
It allows to run a different version, as:
COVERAGE_BIN=/usr/bin/coverage3 sudo -E make check
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #503
Approved by: cgwalters
I don't feel comfortable with running test_storage.sh on my
development machine, so enable it only with ENABLE_DESTRUCTIVE=1.
Tests are marked to be destructive with an inline tag ":destructive-test".
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #392
Approved by: jlebon
Images or containers can now have an associated
man-like help page to help users understand more
about the image. Typical information included
are things like a longer description, if the image
needs to be installed, security implications, steps
to upgrade, etc.
The default behavior is for atomic to display
a file called help.1 (in man format) located in
the / of the docker object. This default
can be overriden with the HELP LABEL. The
HELP LABEL needs to be a fully qualified
command to work correctly.
This allows users to skip all/certain tests.
$ sudo make test
tests all integration tests
$ sudo make test TEST_INTEGRATION=
skip all integration tests
$ sudo make test TEST_INTEGRATION='display pass'
test only the 'display' and 'pass' integration tests
Resolves: #259
We can't hardcode paths to /usr/libexec/atomic because we need the tests
to work without having to install atomic. We use an env var instead
which the test harness then overrides.
Use --display to view run or install commands without
executing the commands. This is useful when working with custom images
with LABEL methods defined.
Signed-off-by: Sally O'Malley <somalley@redhat.com>
This commit adds `IMAGE` and `NAME` as environment variables
passed to install, uninstall, stop, and run (similarly to
`CONFDIR`, `DATADIR`, and `LOGDIR`). This allows users to write
`NAME=${NAME}` instead of `NAME=NAME`, and also enables `${NAME}`
and `${IMAGE}` to be used in arbitrary parts of the commands.