1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-06 03:45:28 +01:00

36 Commits

Author SHA1 Message Date
Brent Baude
100031ec34 Allow granular UNIT tests
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
2016-11-07 15:21:59 +00:00
Jonathan Lebon
e2f40a0dee test.sh: also look for coverage3
Closes: #735
Approved by: rhatdan
2016-10-28 14:45:53 +00:00
Dan Walsh
28579aea79 Cleanup of dbus interfaces
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
2016-10-27 13:37:16 +00:00
Dan Walsh
656ade8846 Cleanup handling of dbus calls and test client.
Closes: #723
Approved by: rhatdan
2016-10-24 21:39:23 +00:00
Jonathan Lebon
7acc6c118b test.sh: don't require coverage
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
2016-10-13 16:37:01 +00:00
Jan Pazdziora
f97e97f172 Add support for LABEL RUN_OPTS_FILE and ${RUN_OPTS}
Closes: #541
Approved by: rhatdan
2016-08-19 13:02:26 +00:00
Giuseppe Scrivano
72236c7c26 tests: run atomic with --debug
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #528
Approved by: rhatdan
2016-08-10 12:41:35 +00:00
Giuseppe Scrivano
82266bc279 test: do not override COVERAGE_BIN if set
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
2016-07-29 10:50:54 +00:00
Giuseppe Scrivano
75fc43b769 tests: add tests for system containers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #401
Approved by: rhatdan
2016-06-01 13:01:22 +00:00
Giuseppe Scrivano
d282560179 tests: better align output
Use truncated printf output instead of aligning with tabs.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #392
Approved by: jlebon
2016-05-31 19:15:57 +00:00
Giuseppe Scrivano
21a1a1d98b tests: do not run destructive tests by default
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
2016-05-31 19:15:57 +00:00
Giuseppe Scrivano
287bc7d414 tests: Change the OSTree repo mode to bare-user
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #388
Approved by: cgwalters
2016-05-23 11:45:00 +00:00
Giuseppe Scrivano
bf61f296a3 tests: do not use the system OSTree repository
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #377
Approved by: jlebon
2016-05-20 20:03:19 +00:00
Dan Walsh
561c1866d6 Test that the atomic command is handling params properly
Want to make sure that we do not regress the handling of test params.

Closes: #358
Approved by: rhatdan
2016-05-12 19:51:20 +00:00
Charlie Drage
463cd6f79b Check if coverage is in local bin first 2016-01-18 11:17:14 -05:00
Brent Baude
70427a5159 Atomic/help.py: Display man-like help for an image
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.
2016-01-15 10:02:58 -06:00
Jonathan Lebon
3dc7aa1723 test.sh: add TEST_INTEGRATION support
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
2015-12-18 12:26:53 -05:00
Jonathan Lebon
139ccba3d3 export/import: don't hardcode paths
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.
2015-11-26 09:47:51 -05:00
Shishir Mahajan
466219bc45 Atomic migrate command: Added tests
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-11-12 11:58:10 -05:00
Sally O'Malley
c13019c43e WIP: Add --display to run|install
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>
2015-07-27 16:51:23 -04:00
William Temple
6bf94dd979 Allow arbitrary files in test images.
Signed-off-by: William Temple <wtemple@redhat.com>
2015-07-21 16:38:04 -04:00
William Temple
bb3ae02178 Integrate remote inspection with Atomic info.
Signed-off-by: William Temple <wtemple@redhat.com>
2015-07-20 16:16:12 -04:00
William Temple
844cc4512d New test framework.
Signed-off-by: William Temple <wtemple@redhat.com>
2015-07-10 14:09:37 -04:00
Dan Walsh
b3152e17ed Merge branch 'master' of github.com:projectatomic/atomic 2015-06-19 08:36:06 -04:00
Dan Walsh
0c60684d21 Add tests for running spc 2015-06-19 08:36:04 -04:00
Solly Ross
d8d695381e Add IMAGE and NAME as environment variables
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.
2015-06-17 14:23:16 -04:00
William Temple
a20794b559 atomic mount/unmount commands 2015-06-04 14:43:34 -04:00
Dan Walsh
3e96d72a66 Fix errors on missing images 2015-06-03 18:05:43 -04:00
Dan Walsh
873760516b Add tests for atomic version 2015-03-26 14:00:17 -04:00
Dan Walsh
d68d76b4f7 uninstall is not executing the UNINSTALL LABEL, this fixes the problem and adds a test 2015-03-02 12:12:01 -05:00
Dan Walsh
814152f725 Make sure NetworkManager configures resolv.conf correctly 2015-02-08 17:33:44 +01:00
Dan Walsh
b6015f5021 Add fedora image as a test case 2015-02-02 10:56:00 -05:00
Dan Walsh
c07cd204ae Add more tests 2015-01-30 14:17:52 -05:00
Colin Walters
cc8949e259 test: Don't error out on initial run
The busybox container won't exist the first time someone runs
the tests.
2015-01-30 09:03:26 -05:00
Colin Walters
cbaa4f4ec2 test.sh: Use bash -xe, make executable
First, let's make this directly executable.
Second, fix the syntax to use -xe as one argument.
2015-01-30 09:00:19 -05:00
Dan Walsh
a0aeb8b0f1 If RUN does not exist, we shoudl create container and then start it 2015-01-29 16:26:44 -05:00