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

50 Commits

Author SHA1 Message Date
Giuseppe Scrivano
6ce51fd4ec tests: skip system containers test if skopeo copy to ostree fails
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1244
Approved by: rhatdan
2018-06-27 13:19:55 +00:00
Yu Qi Zhang
14e878dbfc Fix tests for f26
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
2017-08-23 18:33:48 +00:00
baude
64843d3e84 Fix Python3 issues for F26
Several tests failed (as reported in issues #1057) on Fedora 26.

Closes: #1060
Approved by: rhatdan
2017-08-07 17:45:45 +00:00
Giuseppe Scrivano
91f1e1621d tests: check virtual size is correct for syscontainers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1029
Approved by: baude
2017-06-14 16:51:23 +00:00
Yu Qi Zhang
9038af0652 syscontainers: add new test image
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
2017-05-03 15:59:16 +00:00
Tomas Tomecek
404e4a20ad test.sh: quote to disable expansion
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

Closes: #955
Approved by: baude
2017-04-28 22:52:40 +00:00
Steve Milner
67ebafb65a syscontainers: Add run once test Dockerfile and files
Closes: #952
Approved by: baude
2017-04-13 18:32:25 +00:00
Giuseppe Scrivano
2d59ef8399 tests: add tests for RPM generation of system containers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #949
Approved by: baude
2017-03-29 13:44:47 +00:00
Brent Baude
1b216a4919 Atomic/install.py: Record installs for later use
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
2017-03-28 19:10:57 +00:00
Brent Baude
791f62eff9 Add base integration test for dbus
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
2017-02-20 21:36:18 +00:00
Brent Baude
5eaaa3b1c1 Build test images more effeciently
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
2017-01-26 20:56:08 +00:00
Brent Baude
5eb74590ee test.sh Add summary build time for each each
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
2017-01-26 20:56:08 +00:00
Dan Walsh
a67082f3e4 The HELP label by default should be "help"
But we want to check for all cases.  Currently if a image uses the
standard help label, atomic will fail to find it.

Closes: #754
Approved by: rhatdan
2016-11-28 21:01:09 +00:00
Brent Baude
121435f1cc Use centos for all test images
To download less images, we now just used centos for the
base of all atomic-test images

Closes: #759
Approved by: rhatdan
2016-11-21 15:32:09 +00:00
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