Commit graph

229 commits

Author SHA1 Message Date
Brian Goff
9ca4aa4797 Merge pull request #15798 from calavera/volume_driver_host_config
Move VolumeDriver to HostConfig to make containers portable.
2015-09-08 22:05:40 -04:00
Hu Keping
c957d9c768 Remove dead code
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-09-06 19:52:39 +08:00
David Calavera
6549d6517b Move VolumeDriver to HostConfig to make containers portable.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-04 12:42:44 -04:00
John Howard
69bf17ffbd Fixes 2 panics initialising tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-03 18:26:38 -07:00
Brian Goff
b3b7eb2723 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-26 13:37:52 -04:00
Brian Goff
5929502b4e Merge pull request #15412 from vdemeester/dont-sleep-too-much
time.Sleep in integration tests — comment and waitRun/waitInspect
2015-08-21 20:43:55 -04:00
Jessie Frazelle
fefc9a3a6a Merge pull request #15750 from mountkin/fix-exec-panic
fix a panic when the exec fails to start
2015-08-21 15:54:58 -07:00
Shijiang Wei
fcf9daad91 fix a panic when the exec fails to start
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-08-22 00:01:44 +08:00
Clinton Kitson
6b8129d1fe added check for bind on create to determine local volume driver
Signed-off-by: Clinton Kitson <clintonskitson@gmail.com>
2015-08-20 01:40:04 -07:00
Vincent Demeester
799d9605d6 Remove/Comment time.Sleep in integration tests
Remove what seems unnecessary time.Sleep (1 second even) and comment the
ones that seemed necessary.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-18 20:36:08 +02:00
Arnaud Porterie
bf892dcfcc Merge pull request #15420 from vlajos/typofixes-vlajos-20150807
typofix - https://github.com/vlajos/misspell_fixer
2015-08-08 01:08:49 -07:00
David Calavera
196aa6d62d Merge pull request #14965 from stefanberger/nohidevols2
Have network files mounted read-only when -v parameter has 'ro' passed
2015-08-07 19:10:59 -07:00
Veres Lajos
5146232723 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
2015-08-07 23:25:49 +01:00
Stefan Berger
38295d4b48 Have network files mounted read-only when -v parameter has 'ro' passed
Have network files mounted read-only when mounted using the -v
open and -v parameter has 'ro' passed.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-08-06 20:37:28 -04:00
John Howard
da44d0fccb Windows: Test infrastructure plumbing
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-08-05 14:34:32 -07:00
Kir Kolyshkin
a83a769347 Simplify and fix os.MkdirAll() usage
TL;DR: check for IsExist(err) after a failed MkdirAll() is both
redundant and wrong -- so two reasons to remove it.

Quoting MkdirAll documentation:

> MkdirAll creates a directory named path, along with any necessary
> parents, and returns nil, or else returns an error. If path
> is already a directory, MkdirAll does nothing and returns nil.

This means two things:

1. If a directory to be created already exists, no error is returned.

2. If the error returned is IsExist (EEXIST), it means there exists
a non-directory with the same name as MkdirAll need to use for
directory. Example: we want to MkdirAll("a/b"), but file "a"
(or "a/b") already exists, so MkdirAll fails.

The above is a theory, based on quoted documentation and my UNIX
knowledge.

3. In practice, though, current MkdirAll implementation [1] returns
ENOTDIR in most of cases described in #2, with the exception when
there is a race between MkdirAll and someone else creating the
last component of MkdirAll argument as a file. In this very case
MkdirAll() will indeed return EEXIST.

Because of #1, IsExist check after MkdirAll is not needed.

Because of #2 and #3, ignoring IsExist error is just plain wrong,
as directory we require is not created. It's cleaner to report
the error now.

Note this error is all over the tree, I guess due to copy-paste,
or trying to follow the same usage pattern as for Mkdir(),
or some not quite correct examples on the Internet.

[v2: a separate aufs commit is merged into this one]

[1] https://github.com/golang/go/blob/f9ed2f75/src/os/path.go

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-07-30 11:48:08 -07:00
Doug Davis
8c9cd0418d Merge pull request #15045 from cpuguy83/fix_dockercmdwitherror
Don't pass check.C to dockerCmdWithError
2015-07-27 16:04:16 -04:00
Brian Goff
693ba98cb9 Don't pass check.C to dockerCmdWithError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-27 14:33:32 -04:00
Josh Hawn
d06ffd0a5f [integration-cli] fix windows build test cases
Use the same IP as the DOCKER_HOST when making a remote file server.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-27 11:30:38 -07:00
Jessie Frazelle
70842ea942 Merge pull request #14899 from mountkin/fix-exec-resize-panic
fix the panic caused by resizing a starting exec
2015-07-27 10:27:29 -07:00
Nathan McCauley
268fa5af47 Add tests simulating an evil server
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
2015-07-24 16:31:18 -07:00
Derek McGowan
871d2b96ed Add build integration cli tests
Clean up tests to remove duplicate code

Add tests which run pull and create in an isolated configuration directory.
Add build test for untrusted tag

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-07-24 16:31:12 -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
Shijiang Wei
ba5e098052 fix the panic caused by resizing a starting exec
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-07-24 20:43:07 +08:00
Shishir Mahajan
e7fc632147 Add and modify tests for legacy and new daemon invokations
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-23 20:31:43 -04:00
John Howard
09b86c46b8 Stop SIGSEGV on test dial not reachable
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-22 18:44:04 -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
Sebastiaan van Stijn
50d2597e49 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
2015-07-22 09:02:00 +02:00
David Calavera
1c3cb2d31e Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-21 15:33:05 -07:00
Lei
c6cde91b7d Add dockerCmdWithStdoutStderr function
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-07-18 10:48:28 +08:00
Vincent Demeester
4290bdefab Add dockerCmdWithError
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-14 08:35:06 +02:00
Qiang Huang
d28b0ba115 Fix file leak in integration-cli
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-09 18:52:18 +08:00
Shijiang Wei
1cbf5a54da fix the goroutine leak in the stats API if the container is not running
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-06-23 19:38:15 +08:00
Moysés Borges
d48bface59 Support downloading remote tarball contexts in builder jobs.
Signed-off-by: Moysés Borges <moysesb@gmail.com>
2015-06-19 16:35:00 -03:00
Michael Käufl
54ac3d9c76 Made doc consistent with code
The name of the folder was shortened in a1ea562

Signed-off-by: Michael Käufl <docker@c.michael-kaeufl.de>
2015-06-07 22:32:29 +02:00
David Calavera
6c42b3947a Merge pull request #12838 from fntlnz/test-cmd
Using dockerCmd when possible
2015-06-02 14:12:22 -07:00
Jessica Frazelle
a1ea562b20 lol 108 chars ETOOMANY
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-22 10:10:17 -07:00
Lorenzo Fontana
a2787469ac Using dockerCmd when possible
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
2015-05-19 20:33:59 +02:00
Jessie Frazelle
d0bc0153c6 Merge pull request #12278 from duglin/12267-Wildcards
Fix for Daemon crashing when wildcards are used for COPY/ADD
2015-05-07 17:01:16 -07:00
Arnaud Porterie
44de5fecce Add DOCKER_USERLANDPROXY test variable
Add an convenient way to switch --userland-proxy on and off in
integration tests.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-05-04 16:07:51 -07:00
Madhu Venugopal
dd0666e64f Integration Tests for --icc=false & container Linking using --expose
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 10:16:31 -07:00
Madhu Venugopal
f3f5ff9d83 Integration tests for --bridge daemon flag
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-04-29 09:55:25 -07:00
Doug Davis
82daa43844 Fix for Daemon crashing when wildcards are used for COPY/ADD
in the filename and the command itself

Closes #12267

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-27 19:09:57 -07:00
Antonio Murdaca
bb1c576eb3 Expose whole Response struct in sockRequestRaw
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-27 18:49:00 +02:00
Phil Estes
6e9a6f5396 Merge pull request #12765 from LK4D4/registry_suite
Implement DockerRegistrySuite in integration-cli
2015-04-24 23:05:29 -04:00
Alexander Morozov
f696b1071a Implement DockerRegistrySuite in integration-cli
To avoid manually creating and destroying registrys in tests.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 14:17:00 -07:00
Alexander Morozov
9bea123bdd Not protect dangling images for integration-cli
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 13:16:51 -07:00
Brian Goff
b76bbae413 Merge pull request #12755 from LK4D4/use_f_for_remove
Use -f for rm instead of kill before
2015-04-24 15:34:38 -04:00
Alexander Morozov
887ad57cfa Use -f for rm instead of kill before
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 11:55:54 -07:00
Alexander Morozov
a9688cdca5 Implement teardown removeAllImages
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 10:37:21 -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
Jessie Frazelle
59ae92d55c Merge pull request #12575 from brahmaroutu/integration_test7_12255
Move https tests as unit tests under client
2015-04-23 13:17:54 -07:00
Jessie Frazelle
59acccb6f2 Merge pull request #12692 from cpuguy83/fix_commit_test
Fix race with TestContainerApiCommit
2015-04-23 11:31:27 -07:00
Srini Brahmaroutu
05013f1250 Move https integration tests as unit tests under client
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-04-23 15:40:46 +00:00
Brian Goff
563708d78d Fix race with TestContainerApiCommit
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-23 09:45:06 -04:00
Antonio Murdaca
4b9fe9c298 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 00:58:13 +02: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
bobby abbott
621b601b3c Removed unnecessary error output from dockerCmd
Changed method declaration. Fixed all calls to dockerCmd
method to reflect the change.

resolves #12355

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-04-17 09:11:14 -07:00
Brian Goff
5dc02a2fa8 Move TestPostJsonVerify to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-16 13:49:28 -04:00
Brian Goff
8232cc777e Make sockRequestRaw return reader, not []byte
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-16 13:40:49 -04:00
Antonio Murdaca
91bfed6049 Remove job from logs
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-13 08:25:31 +02:00
Yuan Sun
8636a21991 add TestContainerApiPause case
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-04-10 09:14:01 +08:00
Jessica Frazelle
255b84444a cleanup/fix integration-cli for overlay in overlay
Signed-off-by: Jessica Frazelle <jess@docker.com>
2015-04-08 16:59:36 -07:00
Brian Goff
475c65319b Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-06 09:21:18 -04:00
paul
c5bf2145f1 Fix vet warning
Signed-off-by: Paul Mou <ppymou@gmail.com>
2015-03-25 20:31:02 -07:00
Antonio Murdaca
b80fae7356 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00
George MacRorie
664ef0cbe2 Cleanup redundant else statements find via golint #11602
Signed-off-by: George MacRorie <gmacr31@gmail.com>
2015-03-23 20:40:29 +00:00
Jessie Frazelle
a5269223a7 Merge pull request #11320 from estesp/fix-daemon-startup
Fix daemon shutdown on error after rework of daemon startup
2015-03-17 19:04:25 -07:00
Phil Estes
459e58ffc9 Fix daemon shutdown on error after rework of daemon startup
Currently the daemon will not stop on error because the serve API job is
blocking the channel wait for daemon init.  A better way is to run the
blocking serve API job as a goroutine and make sure that error
notification gets back to the main daemon thread (using the already
existing channel) so that clean shutdown can occur on error.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-17 14:15:00 -04:00
Darren Shepherd
abb5e9a077 Set labels on container create
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Yuan Sun
a02256577a correct a spelling mistake
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
2015-03-12 09:22:51 -04:00
Jessie Frazelle
52f6da2238 Merge pull request #11278 from ahmetalpbalkan/win-cli/fakeGIT
integ-cli: use httpserver container for fakeGIT
2015-03-11 18:19:11 -07:00
Ahmet Alp Balkan
e424c54d9c integ-cli: fix clock skew against remote test daemon
This fixes the `docker events`-related tests as they have been
failing due to clock skew between CI machine and test daemon on
some other machine (even 1-2 seconds of diff causes races as
we pass local time to --since/--until).

If we're running in same host, we keep using time.Now(), otherwise
we read the system time of the daemon from `/info` endpoint.

Fixes pretty much all events-related tests on windows CI.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-11 10:28:56 -07:00
Ahmet Alp Balkan
44ffb199d0 integ-cli: use httpserver container for fakeGIT
This change enables `fakeGIT()` to use the new `fakeStorage`
server which is automatically starting a container on the remote test
daemon machine using the git repo directory (when requested).

Fixes the following tests:

- `TestBuildApiLowerDockerfile`
- `TestBuildApiBuildGitWithF`
- `TestBuildApiDoubleDockerfile` (skipped on windows: NTFS case-insensitive)
- `TestBuildFromGIT` (still needs local server)

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-10 22:48:35 -07:00
Ahmet Alp Balkan
2e95bb5f1a integ-cli: Implement remote FakeStorage server for build via URL tests
Implemented a FakeStorage alternative that supports spinning
up a remote container on DOCKER_TEST_HOST to serve files over
an offline-compiled Go static web server image so that tests which
use URLs in Dockerfile can build them over at the daemon side.

`fakeStorage` function now automatically chooses if it should
use a local httptest.Server or a remote container.

This fixes the following tests when running against a remote
daemon:

- `TestBuildCacheADD`
- `TestBuildCopyWildcardNoFind`
- `TestBuildCopyWildcardCache`
- `TestBuildADDRemoteFileWithCache`
- `TestBuildADDRemoteFileWithoutCache`
- `TestBuildADDRemoteFileMTime`
- `TestBuildADDLocalAndRemoteFilesWithCache`
- `TestBuildADDLocalAndRemoteFilesWithoutCache`
- `TestBuildFromURLWithF`
- `TestBuildApiDockerFileRemote`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-09 12:03:55 -07:00
Ahmet Alp Balkan
d18689dff7 integ-cli: also preserve SystemRoot env var
Windows CI fails to dial remote test host over tcp in the test cases where
we clear environment variables during `exec(dockerBinary, ...)` in the
absence of `SystemRoot` environment variable (typically points to `c:\windows`).

This fixes tests:
- `TestRunEnvironmentErase`
- `TestRunEnvironmentOverride`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-07 01:09:01 -08:00
Jessie Frazelle
f92213af88 Merge pull request #11005 from ahmetalpbalkan/win-cli/RegistryV2-skip
integ-cli: skip tests launching registry-v2
2015-03-02 12:41:21 -08:00
Mabin
d5ea4bae4a when the file that was opened has been read into buffer, the file should be close.
Signed-off-by: Mabin <bin.ma@huawei.com>
2015-02-27 19:09:17 +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
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
Jessie Frazelle
934535db9c Merge pull request #10468 from noironetworks/10457-Pause-and-unpause-accept-multi-containers
Allow docker pause and unpause to accept multiple containers
2015-02-19 15:16:05 -08:00
Tianon Gravi
ed345fb18e Run tests in stricter environment
Use `env -i` to very explicitly control exactly which environment variables leak into our tests.  This enforces a clean separation of "build environment knobs" versus "test suite knobs".

This also includes a minor tweak to how we handle starting our integration daemon, especially to catch failure to start sooner than failing tests.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-02-18 23:30:43 -07:00
Arnaud Porterie
9ee8d41ab2 Merge pull request #10800 from ahmetalpbalkan/TestRunEnv-fix
integration-cli: Preserve DOCKER_TEST_HOST in env-clearing tests
2015-02-16 09:23:42 -08:00
Ahmet Alp Balkan
4f377fbe9f docker_cli_run_test: Preserve DOCKER_TEST_HOST in env-clearing tests
For Windows, we run integration-cli with DOCKER_TEST_HOST env var b/c
daemon is on some remote machine. This keeps the DOCKER_HOST set by
bash scripts in the env.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-14 03:26:56 -08:00
Ahmet Alp Balkan
ac6cb41d52 docker_api_attach_test: fix WS test to use DOCKER_TEST_HOST if specified
TestGetContainersAttachWebsocket is currently broken on Windows CI tests
b/c it has hardcoded unix://var/run/docker.sock.  This change makes use
of @icecrime's code in docker_utils and generalizes it with sockConn()
to provide a net.Conn by making use of DOCKER_TEST_HOST. Also fixes
the test.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-12 15:11:19 -08:00
André Martins
0ce42dcc96 Fixes #10457-Pause-and-unpause-accept-multi-containers
Applied multi parameters to pause and unpause.
Created a new test file dedicated for pause commands.
Created a new utility function to get a slice of paused containers.
Updated documentation

Signed-off-by: André Martins <martins@noironetworks.com>
2015-02-07 00:28:49 +00:00
Doug Davis
198ff76de5 Add an API test for docker build -f Dockerfile
I noticed that while we have tests to make sure that people don't
specify a Dockerfile (via -f) that's outside of the build context
when using the docker cli, we don't check on the server side to make
sure that API users have the same check done. This would be a security
risk.

While in there I had to add a new util func for the tests to allow us to
send content to the server that isn't json encoded - in this case a tarball

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-02 23:40:20 -08:00
Arnaud Porterie
de8ea06d7d Fix race in test registry setup
Wait for the local registry-v2 test instance to become available to
avoid random tests failures.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-31 11:31:41 -08:00
Arnaud Porterie
dbec2317e5 Add some push test coverage
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-15 14:05:06 -08:00
Arnaud Porterie
e1ef33449f Take DOCKER_TEST_HOST into account
Tests no longer make the assumption that the daemon can be accessed
through unix:///var/run/docker.sock.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-14 16:14:27 -08:00
Alexander Morozov
a75b02fe72 Fix format calls as suggested by vet
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:12:03 -08:00
Alexander Morozov
8dc86c0e36 More graceful stop for testing daemon
Fixes problem with TestDaemonAllocatesListeningPort

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-23 13:15:19 -08:00
Michael Crosby
bb24f99d74 Merge pull request #9356 from cc272309126/fix-exec-paused-container
Fix the issue that when docker exec a paused container, it will always
2014-12-09 11:01:44 -08:00
Doug Davis
5c91bb93a7 Make 'docker build' send non-err output to stdout
Right now 'docker build' will send:
   Sending build context to Docker daemon
to stderr, instead of stdout.  This PR fixes that.

I looked in the rest of api/client/commands.go for other cases
that might do this and only one jumped out at me:
  https://github.com/docker/docker/blob/master/api/client/commands.go#L2202
but I think if I changed that to go to stdout then it'll mess people up
who are expecting just the container ID to be printed to the screen and
there is no --quiet type of flag we can check.

Closes #9404

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-12-04 14:06:40 -08:00
cc272309126
1bb02117db Fix the issue when docker exec a paused container, it will always hang.
Add the test case of this issue.

Docker-DCO-1.1-Signed-off-by: Chen Chao <cc272309126@gmail.com> (github: cc272309126)
2014-12-05 03:10:44 +08:00
Brian Goff
c8a3d31332 Check for no Cmd on exec create endpoint
Fixes #9414

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-12-01 17:54:15 -05: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
Erik Hollensbe
20575d20ba Break some routines out of the mutable files test for future use
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-11-25 16:46:09 -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
Tonis Tiigi
bbb245defe Fix deleteImages() helper for multiple names
Pass every image name as separate argument.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-11-19 23:42:16 +02:00
Doug Davis
2facc04673 Add --log-level support
Next steps, in another PR, would be:
- make all logging go through the logrus stuff
- I'd like to see if we can remove the env var stuff (like DEBUG) but we'll see

Closes #5198

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-15 09:00:48 -08:00
Srini Brahmaroutu
78a272ce14 Allowing resize tty to only work when container is started
Addresses #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2014-10-23 21:31:34 +00:00
Brian Goff
964f9965c7 Clean volume paths
Fixes #8659

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-20 19:07:56 -04:00
Jessica Frazelle
73eadbc6a1 Cleanup errorOut resp in docker_utils.go
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-16 15:06:16 -07:00
Jessica Frazelle
949ab47710 Replace '%s' in test utils
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-14 10:59:38 -07:00
Brian Goff
c985302c5c Fixes re-creating volume on (re)start
When a container is restarted all the volume configs are parsed again.
Even if the volume was already handled in a previous start it was still
calling "FindOrCreateVolume" on the volume repo causing a new volume to
be created.

This wasn't being detected because as part of the mount initialization
it checks to see if the the _mount_ was already initialized, but this
happens after the parsing of the configs.
So a check is added during parsing to skip a volume which was already
created for that container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-10-08 16:25:51 -04:00
Michael Crosby
50fa9dffcf Allow child to overwrite entrypoint from parent
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-07 23:45:35 +00: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
51a56399f6 Rewrite TestBuildWithInaccessibleFilesInContext to not use fixtures
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-24 17:09:14 +04:00
unclejack
c6965e3e45 integcli: add & use dockerCmdWithTimeout & InDir
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 21:02:51 +03:00
unclejack
5d1cb9d005 integcli: add util to fetch container status
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-22 20:34:57 +03:00
Jessica Frazelle
f49c3f287b fixes #7802, when api version 1.11 is json.Marshaling the container struct
Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com>

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com> (github: )
2014-09-08 09:30:33 -07:00
Tibor Vass
39310448da handle empty envvars for DOCKER_GRAPHDRIVER and DOCKER_EXECDRIVER in daemon test framework
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-09-03 17:14:19 -07:00
Tibor Vass
defe01daf8 fix race in daemon test framework
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-09-03 17:14:19 -07:00
Tibor Vass
054b921a2c Add Daemon test utils
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-09-02 10:58:36 -07:00
Victor Vieux
5b27fbc0e2 move TestEntrypoint & TestBindMounts
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-08-28 00:25:10 +00:00
Alexandr Morozov
075e1bc1c3
Remove internet dependency from TestBuildCacheADD
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-18 14:13:43 +04:00
unclejack
b36f630817 Merge pull request #7304 from unclejack/refactor_build_tests
integration cli: minor refactor of the build tests
2014-08-08 01:24:51 +03:00
unclejack
f60c8e9e61 integcli: add some more docker utils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-29 15:56:41 +03:00
Alexandr Morozov
5b0d4cf296 Test on building from GIT url
Also I added fake git server to utils
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-07-24 11:19:16 +04:00
unclejack
e5e8669c72 integcli: add JSON utils for testing
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-17 23:11:40 +03:00
unclejack
dad4768037 integcli: add & use pullImageIfNotExist for pulls
This speeds up the tag cli integration tests by about 20 seconds.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-02 18:45:11 +03:00
unclejack
eb1e8e884d integration cli: add imageExists to docker utils
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-06-30 22:22:29 +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
LK4D4
2e85568816 Aux functions for build testing
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-02 23:40:13 +04:00
unclejack
77f5425260 integcli: add getContainerCount utility function
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-05-19 23:10:54 +03: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
Solomon Hykes
30f22ee9e3 Convert a legacy integration test to a clean v2 CLI integration test.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-07 20:34:21 +00:00
unclejack
6db32fdefd initial version of cli integration tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-03-29 23:09:40 +02:00