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.