Commit graph

43 commits

Author SHA1 Message Date
Anusha Ragunathan
3e44703cae Add basic integration tests for plugins.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit a2d48c9e4e)
2016-06-16 23:36:53 -07:00
Michael Holzheu
bf2a577c13 Enable seccomp for s390x
To implement seccomp for s390x the following changes are required:

1) seccomp_default: Add s390 compat mode

   On s390x (64 bit) we can run s390 (32 bit) programs in 32 bit
   compat mode. Therefore add this information to arches().

2) seccomp_default: Use correct flags parameter for sys_clone on s390x

   On s390x the second parameter for the clone system call is the flags
   parameter. On all other architectures it is the first one.

   See kernel code kernel/fork.c:

   #elif defined(CONFIG_CLONE_BACKWARDS2)
   SYSCALL_DEFINE5(clone, unsigned long, newsp, unsigned long, clone_flags,
                   int __user *, parent_tidptr,

   So fix the docker default seccomp rule and check for the second
   parameter on s390/s390x.

3) seccomp_default: Add s390 specific syscalls

  For s390 we currently have three additional system calls that should
  be added to the seccomp whitelist:

  - Other architectures can read/write unprivileged from/to PCI MMIO memory.
    On s390 the instructions are privileged and therefore we need system
    calls for that purpose:

    * s390_pci_mmio_write()
    * s390_pci_mmio_read()

  - Runtime instrumentation:

    * s390_runtime_instr()

4) test_integration: Do not run seccomp default profile test on s390x

   The generated profile that we check in is for amd64 and i386
   architectures and does not work correctly on s390x.

   See also: 75385dc216 ("Do not run the seccomp tests that use
   default.json on non x86 architectures")

5) Dockerfile.s390x: Add "seccomp" to DOCKER_BUILDTAGS

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2016-06-06 08:13:22 -04:00
Anusha Ragunathan
c7076d2670 Add non-experimental daemon as a test requirement.
For test that should be exclusively run only in regular daemon builds
and not in the experimental version, add a requirement.

Verified using TestCleanupMountsAfterDaemonKill.
- On regular daemon, the test ran.
- On experimental daemon, the test skipped.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-04-07 14:46:32 -07:00
mYmNeo
90f512427f fix test requirement about devicemapper and not overlay
Signed-off-by: mYmNeo <thomassong@tencent.com>
2016-04-06 12:40:19 -04:00
cyli
497a58e6e4 Trusted push now adds the tag to every first level delegation role for which we have keys
and for which the tag conforms to path restrictions.

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-03-21 10:56:09 -07:00
Sebastiaan van Stijn
30999ba50c Merge pull request #21138 from tophj-ibm/add-notary-binary-test-requirement
Add notary binary requirement for tests
2016-03-14 13:34:06 +01:00
Christopher Jones
db700a678d Add notary binary requirement for tests
This PR adds the "notary" binary requirement for tests.

Previously, NotaryHosting was checking for the "notary-server"
binary under the name notaryBinary. This renames that reference to
notaryServerBinary, so that notaryBinary can rightly refer
to the actual "notary" binary.

Currently only one test actually uses the notary binary, so it's been
updated accordingly.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-03-11 17:36:12 -05:00
Kenfe-Mickael Laventure
6cbff9505c Update UserNamespaceInKernel test requirement to handle redhat
On redhat based distribution, checking that USER_NS is compiled in the
kernel is not sufficient, we also have to check that the feature as
been enabled.

With this commit, it is now done by checking the content of
`/sys/module/user_namespace/parameters/enable`.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-09 12:42:59 -08:00
Jessica Frazelle
7ab696f6b0
fix centos when userns not in kernel
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-03-02 16:58:49 -08:00
Brian Goff
cfa806378e Merge pull request #20174 from tophj-ibm/remove-power-from-logrus-tests
PPC64LE: Remove testing logrus output from ppc64le
2016-02-10 09:07:47 -05:00
Christopher Jones
736e93a468 Remove testing logrus output from ppc64le
This removes two tests on ppc64le.

There is an old bug with a syscall on power #8653, that causes
logrus to default to using logfmt. These two tests look for
logrus format specific strings, and fail if they don't see it.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-02-09 18:02:18 -05:00
Shishir Mahajan
07184599f7 Tests for PR # 19123: daemon option (--storage-opt dm.basesize) for increasing the base device size on daemon restart
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-02-09 10:47:31 -05:00
Christopher Jones
d12f4babdd Fix test requirement for ARM
Correctly passes the DOCKER_ENGINE_GOARCH env var
to the testing environment

Also fixes logic for skipping a test if on ARM.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-01-19 15:23:46 -05:00
Stefan Scherer
4f339570cb Skip failing tests on ARM to get red/green feedback from Jenkins
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
2016-01-18 17:00:15 +01:00
John Howard
8209571982 Windows: Remove check for volume support
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-13 13:02:30 -08:00
Antonio Murdaca
313b85fa47 integration-cli: requirements: fix typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-06 12:15:42 +01:00
David Calavera
157b66ad39 Remove exec-driver global daemon option.
Each platform has only a driver now.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-05 17:09:58 -05:00
John Howard
2af5034ce8 Windows: Volume integration tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-26 14:33:28 -07:00
Srini Brahmaroutu
dc813c7d13 Skipping two tests when running with GCCGO (CI)
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-10-21 17:53:59 +00:00
Jessica Frazelle
930b27a86b fix logic because jess is the worst
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-09 22:21:24 -04:00
Jessica Frazelle
ea3afdad61 add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-09 20:50:27 -04:00
Srini Brahmaroutu
2c53643b33 adding a Dockerfile.gccgo to use gccgo compiler instead of go compiler.
temporarily disabling registry builds as crypto package is broken with gccgo.

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-09-16 18:56:01 +00:00
John Howard
cd18e7bb73 Test infrastructure for cross platform
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-08-31 09:10:18 -07:00
Derek McGowan
58a1de9b59 Add integration cli trust tests
Added notary server to docker base image.
Created trust suite which runs trust server for running trusted commands.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-24 14:08:20 -07:00
Ben Firshman
6b3c928140 Fix golint warnings for integration-cli
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-07-22 14:03:50 +01:00
John Howard
c1b524486c Fix Windows CI fail due to GH13866 and patch up tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-09 10:09:45 -07:00
Michael Crosby
a5283d2ff3 Merge pull request #13866 from brahmaroutu/runOOM_13766
RunOOM test should check to see if Oom Control is enabled
2015-07-07 16:21:46 -07:00
root
e7fb38410d RunOOM test should check to see if Oom Control is enabled
closes #13766
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-07-06 21:15:55 +00:00
Vincent Demeester
6e4c6da819 Fix integration tests with testRequires(c, Network)
It seems http://hub.docker.com is not accessible anymore, so switching
to https://hub.docker.com for testRequires(c, Network).

Adds a Timeout check on the TestRequirement to *panic* if there is a
timeout (fail fast).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-06 22:08:35 +02:00
Dave Tucker
2dfb7f3b7d integration-cli: Add Tests for IPv6 and Fixed CIDR
This patch adds tests for the `--ipv6` and `--fixed-cidr` daemon flags

Signed-off-by: Dave Tucker <dt@docker.com>
2015-06-29 14:45:00 +01:00
David Calavera
a914101296 Do not require cgroups capabilities on windows to run the integration tests.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-05-29 11:42:40 -07:00
Qiang Huang
34e5b6af19 Skip test if not have Cpu quota or Cpu period
Closes: #13522

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-05-28 14:59:58 +08:00
Jessica Frazelle
6f75dd85c5 add unshare apparmor profile test
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-20 14:06:00 -07:00
Megan Kostick
c7845e27ee Fixing statusCode checks for sockRequest
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
2015-04-23 15:35:56 -07:00
Alexander Morozov
dc944ea7e4 Use suite for integration-cli
It prints test name and duration for each test.
Also performs deleteAllContainers after each test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-21 10:28:52 -07:00
Antonio Murdaca
91bfed6049 Remove job from logs
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-13 08:25:31 +02:00
Srini Brahmaroutu
5daa9260bc Test image api through local V1 repo
Closes #10967
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-03-23 16:45:48 +00:00
Phil Estes
9057ca2541 Don't test resolv.conf updater on overlay filesystem
The overlay filesystem does not support inotify at this time. The
resolv.conf updater test was passing on overlay-based Jenkins because of
a fluke--because it was DIND, /etc/resolv.conf on the "host" was really
a bind-mounted resolv.conf from the outer container, which means a watch
directly on that file worked as it was not overlay backed.  The new test
(from #10703) unmounts the bind-mounted copy to test create and modify
code-paths, which caused us to hit the issue.

This PR also adds a note to the docs about the lack of auto-update when
using the overlay storage driver.

See https://lkml.org/lkml/2012/2/28/223 for more info on inotify and
overlay.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-05 00:22:01 -05:00
Jessica Frazelle
321874f376 Last three tests skip on lxc.
Now we can scale lxc tests to all PRs.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-03-04 06:04:25 -08:00
Ahmet Alp Balkan
e2aa8f0cd9 integ-cli: skip tests launching registry-v2
Some pull/push tests are launching `registry-v2`
binary which is compiled and installed if the tests
are running in-container through `make test-integration-cli`.

However, registry is not supported to run on non-linux
platforms and we can't really spin up any registry-v2
containers in the remote DOCKER_TEST_HOST at this point.

Just skipping those with the new TestRequirement called
`RegistryHosting`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-24 23:19:59 -08:00
Ahmet Alp Balkan
102e061147 integration-cli: add test requirement ExecSupport
Skip tests based on remote daemon's exec support (to exclude
these tests from `make test` ran in LXC case). Makes use of
`test_no_exec` build tag passed by build scripts.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-20 23:24:30 -08:00
Ahmet Alp Balkan
492a58f05f integ-cli: Skip some unix-specific cli tests
Skipping some of the tests closely tied to running in a
unix environment. Windows does not support chmod/chown
and this causes some tests to fail creating desired
behavior.

- `TestBuildWithInaccessibleFilesInContext`: uses chown/chmod
- `TestBuildDockerfileOutsideContext`: uses os.Symlink, not implemented on
  windows
- `TestCpUnprivilegedUser`: uses chmod, and requires 'unprivilegeduser'
  created by Dockerfile (and thus requires to run inside container)
- `TestBuildChownSingleFile`: uses chown

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-20 09:51:10 -08:00
Ahmet Alp Balkan
bc37c036b5 integration-cli: add mechanism to skip tests
If DOCKER_CLIENTONLY is set for test-integration-cli, we don't set
the 'daemon' build tag. 'isRemoteDaemon' will help us skip such
tests without a need to move them to a separate file and accidentally
lose track of them.

Added `testRequires` function to skip tests based on predefined
conditions evaluated in runtime. This way we can easily extend test
requirements like:

    testRequires(t, Networking, SameHostDaemon, Linux)

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
2015-02-17 00:43:41 -08:00