Commit Graph

36 Commits

Author SHA1 Message Date
cb9c496f89 fix #12188 integration-cli: tests using "sleep" can timeout too early - change to "top" instead
Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
Upstream-commit: 42d47c31367d288c7a9ae3acff635e995254469c
Component: engine
2015-04-09 10:46:57 -07:00
ab9a366f0e Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 475c65319b4663d630711519e18d0b134c42c7f1
Component: engine
2015-04-06 09:21:18 -04:00
8f2d65bf21 Fix vet warning
Signed-off-by: Paul Mou <ppymou@gmail.com>
Upstream-commit: c5bf2145f172a264d3d8fc63d6717826b95b5ee2
Component: engine
2015-03-25 20:31:02 -07:00
2781401caa fix various problems with iptables.Exists
This modifies iptables.Exists so that it must be called with an explicit
table and chain.  This allows us (a) to generate an appropriate command
line for "iptables -C", which was not previously possible, and (b) it
allows us to limit our strings.Contains() search to just the table and
chain in question, preventing erroneous matches against unrelated rules.

Resolves #10781

Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
Upstream-commit: 3559b4177e611920d87c4dae607c641efb645783
Component: engine
2015-03-16 17:14:45 -04:00
55588c146b 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)
Upstream-commit: 321874f37672b2424a7609caa1aac616b3b23c6a
Component: engine
2015-03-04 06:04:25 -08:00
888a374311 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>
Upstream-commit: 102e0611475c7267dd4d2a87044fcc40b2eddcc0
Component: engine
2015-02-20 23:24:30 -08:00
5db21189fd readContainerFileWithExec for links tests
Shout out to @estesp for the idea. Some use cases of
`readContainerFile` can be replaced with `docker exec $id cat $file`.
This helper method can eliminate the requirement that
host/cli should be on the same machine.

TestRunMutableNetworkFiles and TestRunResolvconfUpdater still
need to access the docker host filesystem as they modify
the file directly from there assuming cli and daemon are
on the same machine.

This fixes TestLinksUpdateOnRestart and TestLinksHostsFilesInject
for Windows CI.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 6bbb456138e48c7558cfe5c797c57d136f1a694b
Component: engine
2015-02-20 23:14:38 -08:00
0f72ec16db Better test cleanup with defer
This fixes a few misuses of `deleteAllContainers()` cleanup
method in integration-cli suite by moving call to the
beginning of the method and guaranteeing their execution
(including panics) with `defer`s.

Also added some forgotten cleanup calls while I'm at it.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 70407ce40ca98d763da8472e7ee94b6e8d66912d
Component: engine
2015-02-20 14:04:36 -08:00
0385663f68 Merge pull request #10818 from estesp/link-add-aliases
Upstream-commit: 356fe89d2431bd54f38b3477aa91ef276f65ffb7
Component: engine
2015-02-19 17:22:53 -05:00
c4aef2a226 Add linked container's name and hostname as aliases to /etc/hosts
Currently when containers are linked the alias name (e.g. from `--link
name:alias`) is added to the parent container's `/etc/hosts` with a
reference to the IP of the linked container.  Some software requires
using the official hostname or node name in operations that need to
match on those values, and it is therefore helpful if the parent
container can refer to the child/link using those same values and still
access the same IP.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 16aa64dc82b6434ec78878fa35eb96e4983b46f8
Component: engine
2015-02-19 14:19:38 -08:00
eba1bf9a43 Merge pull request #10785 from ahmetalpbalkan/win-cli/TestLinks-skip
integration-cli: add const to skip daemon-requiring cli tests
Upstream-commit: 306bb28569c6554205d9ff609d66a09d47af5249
Component: engine
2015-02-18 15:13:05 -08:00
3d483b4bef 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>
Upstream-commit: bc37c036b568f9ae27a7aa457ec73d0c5c6a61cf
Component: engine
2015-02-17 00:43:41 -08:00
a7d8fdce1c Fix daemon.Get error handling with --link setup. Add test.
Fixes newly introduced error flow from daemon.Get() in the link setup
code.  Also added more detail to daemon.Get() comments for clarity.
Added test to test the bogus container link codepath.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 6217f2944f7e9aea4a81615102b7c68740db9350
Component: engine
2015-02-13 15:14:38 -05:00
e0ebfad813 Remove word "fail" from tests
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: aadb6289ccd84b9997a43c8b74b2948236f30e76
Component: engine
2015-02-09 18:01:52 -05:00
36ea1c732a Move links exec test & exec dir test.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 43d1c2010125e3c1ef1013ee2e8b4d9371d70d77
Component: engine
2015-01-23 16:20:46 -08:00
0bd257dcc5 Test for updating linked hosts on restart
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 606c71d424cb21c8256968eb5d965a0855d1af2d
Component: engine
2015-01-21 14:34:40 -08:00
eacdfc7d44 rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 21a809d9ae0ef8392f37c9262dca93ff31966e22
Component: engine
2015-01-13 03:27:17 +00:00
4b105a7583 Create tests for pkg/iptables
Docker-DCO-1.1-Signed-off-by: Ian Bishop <ianbishop@pace7.com> (github: porjo)
Upstream-commit: 0da92633b4161ed1f8babe5ec4a9fe98257d34b5
Component: engine
2014-12-21 12:57:32 +10:00
3890e00172 Running a container that links to a container with --net host
should throw an error.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 6743be44ca9006cb7ca26cd3d8410877727a6313
Component: engine
2014-12-08 11:33:18 -08:00
9442c6a19e Remove unnessary abstraction deepEqual
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: fa753e67ae2bf573c9dfb1da1e1135c5ef5ef415
Component: engine
2014-12-03 17:52:06 -08:00
2d3f0f7b70 Test for updating hosts files via links.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 68bc8de111e4faa2a16583cd45b5c0fd253a3bba
Component: engine
2014-11-25 16:48:36 -08:00
09af87d0eb remove deprecated cmd function in integration-cli
Remove deprecated cmd function in integration-cli
and change cmd to dockerCmd in all test files

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 7fbbd515b1018721e91199960d1933383a8262a1
Component: engine
2014-11-25 00:32:38 +09:00
8f685d0d4a Not fail on updating parent links
Fixes #8796

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: b83fc07d88175c32bb46368a07a9c9e277b22392
Component: engine
2014-11-06 15:30:23 -08:00
c635846b4b Cleanup errorOut resp in links test
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7d38ae7041357e58edee5c26f721e39be9ff1fbd
Component: engine
2014-10-16 15:05:00 -07:00
16206f937c integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c0e632246d821f3f70ffcf7244cf7a9b336b0344
Component: engine
2014-10-06 23:15:17 +03:00
0476801567 Use prefix naming for links tests
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: b6325907e9de4020381ad1d016614f819da58cc6
Component: engine
2014-09-19 22:11:54 +04:00
def10d2ed4 Add logDone logs where it's missing
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 3c984a6d1578947c5adfe13993cb28d88a674bbf
Component: engine
2014-08-28 09:25:57 +04:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
c8bd24665b integcli: fix TestInspectLinksStopped with Go1.3
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: d0cbc54f234b01585670e19b49a8c931b2719472
Component: engine
2014-07-23 01:15:29 +03:00
e55262927d integcli: fix map randomization failures
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 68bb56a4a5a5905a7f5eb0781782e1db5cfc7a89
Component: engine
2014-07-17 23:11:45 +03:00
91359fcf89 Integration cli tests on Links in inspect
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 08182da5d829762366b9bff9cb27b25a010ad1dd
Component: engine
2014-06-27 22:44:13 +04:00
8fa886baf3 integration-cli: tests for /etc/hosts and net=host
Some basic tests to make sure this is acting correctly on machines.

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: 5579bec47be6279569e69c72cccf87864af481de
Component: engine
2014-05-21 15:20:29 -07:00
7a283742d2 Integration test for link and unlink containers
Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 7cc27b2075d6293ab2f54a7255fcb1b1e062fd91
Component: engine
2014-05-11 21:33:01 +01:00
e1bf9e3403 integration-cli: docker_cli_links: fixed broken tests
The tests weren't ... tested when last edited, this patch fixes
them so that they run and pass correctly.

Docker-DCO-1.1-Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Upstream-commit: 924979259ec4c9ef6beab0468325f1cb04deaacb
Component: engine
2014-05-07 01:05:15 +10:00
78dce02460 Simplify integration test for link + hostname.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: dc605c8be76760951d0d12e67409602c7b4b7973
Component: engine
2014-05-05 19:51:47 -07:00
1d128ba235 add linked containers to hosts file
Docker-DCO-1.1-Signed-off-by: Bryan Murphy <bmurphy1976@gmail.com> (github: bmurphy1976)

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Tested-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 53f38a14cd6b61a6b5df68cc3694dcba2b0c1eb7
Component: engine
2014-05-05 19:40:27 -07:00