Commit graph

82 commits

Author SHA1 Message Date
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
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
6bbb456138 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>
2015-02-20 23:14:38 -08:00
Ahmet Alp Balkan
70407ce40c 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>
2015-02-20 14:04:36 -08:00
Steve Francia
356fe89d24 Merge pull request #10818 from estesp/link-add-aliases 2015-02-19 17:22:53 -05:00
Phil Estes
16aa64dc82 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)
2015-02-19 14:19:38 -08:00
Arnaud Porterie
306bb28569 Merge pull request #10785 from ahmetalpbalkan/win-cli/TestLinks-skip
integration-cli: add const to skip daemon-requiring cli tests
2015-02-18 15:13:05 -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
Phil Estes
6217f2944f 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)
2015-02-13 15:14:38 -05:00
Tibor Vass
aadb6289cc Remove word "fail" from tests
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-02-09 18:01:52 -05:00
Jessica Frazelle
43d1c20101 Move links exec test & exec dir test.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-23 16:20:46 -08:00
Alexander Morozov
606c71d424 Test for updating linked hosts on restart
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-21 14:34:40 -08:00
Srini Brahmaroutu
21a809d9ae rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-01-13 03:27:17 +00:00
Ian Bishop
0da92633b4 Create tests for pkg/iptables
Docker-DCO-1.1-Signed-off-by: Ian Bishop <ianbishop@pace7.com> (github: porjo)
2014-12-21 12:57:32 +10:00
Jessica Frazelle
6743be44ca 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)
2014-12-08 11:33:18 -08:00
Jessica Frazelle
fa753e67ae Remove unnessary abstraction deepEqual
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-12-03 17:52:06 -08:00
Erik Hollensbe
68bc8de111 Test for updating hosts files via links.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-11-25 16:48:36 -08:00
Daehyeok Mun
7fbbd515b1 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>
2014-11-25 00:32:38 +09:00
Alexandr Morozov
b83fc07d88 Not fail on updating parent links
Fixes #8796

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-06 15:30:23 -08:00
Jessica Frazelle
7d38ae7041 Cleanup errorOut resp in links test
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-16 15:05:00 -07:00
unclejack
c0e632246d integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-10-06 23:15:17 +03:00
Alexandr Morozov
b6325907e9 Use prefix naming for links tests
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov
3c984a6d15
Add logDone logs where it's missing
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-28 09:25:57 +04:00
Victor Vieux
b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
unclejack
d0cbc54f23 integcli: fix TestInspectLinksStopped with Go1.3
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-23 01:15:29 +03:00
unclejack
68bb56a4a5 integcli: fix map randomization failures
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-17 23:11:45 +03:00
Alexandr Morozov
08182da5d8 Integration cli tests on Links in inspect
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-27 22:44:13 +04:00
Brandon Philips
5579bec47b 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)
2014-05-21 15:20:29 -07:00
Fabio Falci
7cc27b2075 Integration test for link and unlink containers
Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
2014-05-11 21:33:01 +01:00
cyphar
924979259e 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)
2014-05-07 01:05:15 +10:00
Solomon Hykes
dc605c8be7 Simplify integration test for link + hostname.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-05 19:51:47 -07:00
Bryan Murphy
53f38a14cd 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)
2014-05-05 19:40:27 -07:00