Commit Graph

97 Commits

Author SHA1 Message Date
eb72177bf2 fix the goroutine leak in the stats API if the container is not running
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 1cbf5a54dae86e34d8e65508c5640b17cda0eed8
Component: engine
2015-06-23 19:38:15 +08:00
265055473c Support downloading remote tarball contexts in builder jobs.
Signed-off-by: Moysés Borges <moysesb@gmail.com>
Upstream-commit: d48bface59ef28aedc692c1f7c51a7ddde94a7fe
Component: engine
2015-06-19 16:35:00 -03:00
42682fb818 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>
Upstream-commit: 54ac3d9c76df3bbbb54b85b58a503cc1d6155f01
Component: engine
2015-06-07 22:32:29 +02:00
0fb31101e8 Merge pull request #12838 from fntlnz/test-cmd
Using dockerCmd when possible
Upstream-commit: 6c42b3947a6ad91fc487ba34fec634e9f5c48aea
Component: engine
2015-06-02 14:12:22 -07:00
d2b122f94a lol 108 chars ETOOMANY
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: a1ea562b20b36345be2048ea24130b48cf4ec734
Component: engine
2015-05-22 10:10:17 -07:00
15949eba4d Using dockerCmd when possible
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
Upstream-commit: a2787469ac45085cc28a56f67b7c0a50bead893f
Component: engine
2015-05-19 20:33:59 +02:00
f08d29d6d6 Merge pull request #12278 from duglin/12267-Wildcards
Fix for Daemon crashing when wildcards are used for COPY/ADD
Upstream-commit: d0bc0153c637f0e61207fa90b0346174cd5e92e3
Component: engine
2015-05-07 17:01:16 -07:00
afd229a538 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>
Upstream-commit: 44de5fecce9dd194fade1b696e9297ac5c985754
Component: engine
2015-05-04 16:07:51 -07:00
0976611d84 Integration Tests for --icc=false & container Linking using --expose
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: dd0666e64f17329355c77aae1a2ac0fe2fe43402
Component: engine
2015-04-29 10:16:31 -07:00
2a71cc5aaf Integration tests for --bridge daemon flag
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: f3f5ff9d837eecb97eeeb878f0bd416b6ab57cf2
Component: engine
2015-04-29 09:55:25 -07:00
741aa30caf 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>
Upstream-commit: 82daa43844556953101b201bc5983aed4fbe6233
Component: engine
2015-04-27 19:09:57 -07:00
d1facd32fc Expose whole Response struct in sockRequestRaw
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: bb1c576eb3024f7fb4242d76dc835b7c4dd85c5b
Component: engine
2015-04-27 18:49:00 +02:00
8d345fadf2 Merge pull request #12765 from LK4D4/registry_suite
Implement DockerRegistrySuite in integration-cli
Upstream-commit: 6e9a6f53963137e21ba790ab79501a7cd8ed5b96
Component: engine
2015-04-24 23:05:29 -04:00
a2a6303a84 Implement DockerRegistrySuite in integration-cli
To avoid manually creating and destroying registrys in tests.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f696b1071a296bee1f4ac7cafa807ce337fb9f2c
Component: engine
2015-04-24 14:17:00 -07:00
54dc746ae6 Not protect dangling images for integration-cli
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 9bea123bddb9d2ce8b2aa517c2a2a4b269ed39bc
Component: engine
2015-04-24 13:16:51 -07:00
9fc945a9c1 Merge pull request #12755 from LK4D4/use_f_for_remove
Use -f for rm instead of kill before
Upstream-commit: b76bbae4138e7b66022092631d6afb7cfc88a486
Component: engine
2015-04-24 15:34:38 -04:00
785df704ce Use -f for rm instead of kill before
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 887ad57cfa46df542001a1bb4e3ab052ce5f5ed9
Component: engine
2015-04-24 11:55:54 -07:00
c48fdf0abd Implement teardown removeAllImages
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a9688cdca5577d6db65d76f38bcbe4c1e6f5994f
Component: engine
2015-04-24 10:37:21 -07:00
74db1507f9 Fixing statusCode checks for sockRequest
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
Upstream-commit: c7845e27ee2b0462b01d043caeb771f21d5e4ac7
Component: engine
2015-04-23 15:35:56 -07:00
c2fd04b393 Merge pull request #12575 from brahmaroutu/integration_test7_12255
Move https tests as unit tests under client
Upstream-commit: 59ae92d55c4b074db31698c1bc05e2114dc3106c
Component: engine
2015-04-23 13:17:54 -07:00
68210d0ad0 Merge pull request #12692 from cpuguy83/fix_commit_test
Fix race with TestContainerApiCommit
Upstream-commit: 59acccb6f2dae4659797636196dfde7263789923
Component: engine
2015-04-23 11:31:27 -07:00
ab3ddde4ab Move https integration tests as unit tests under client
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 05013f1250dc141ed43f987dd8b6a650d0e47ac9
Component: engine
2015-04-23 15:40:46 +00:00
a10a6cc648 Fix race with TestContainerApiCommit
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 563708d78d42afe89374d5819fdb671ed72c2dad
Component: engine
2015-04-23 09:45:06 -04:00
fdf9a8d629 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4b9fe9c298c8778855c1d14e978c791496dd7c42
Component: engine
2015-04-23 00:58:13 +02:00
1884ef3b9b 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>
Upstream-commit: dc944ea7e48d11a2906e751d3e61daf08faee054
Component: engine
2015-04-21 10:28:52 -07:00
5e15f55a29 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>
Upstream-commit: 621b601b3c602aab5ef0f07903fdf413881bb261
Component: engine
2015-04-17 09:11:14 -07:00
6688a2d031 Move TestPostJsonVerify to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5dc02a2fa8819b3a61bcd5a6fedcfb1a5e64cba5
Component: engine
2015-04-16 13:49:28 -04:00
c48f58ea6d Make sockRequestRaw return reader, not []byte
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8232cc777e329a47e123dbdc42411dae65288a80
Component: engine
2015-04-16 13:40:49 -04:00
b3c5a7d38d Remove job from logs
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 91bfed604959c591a076c2e330cb3ded7443f504
Component: engine
2015-04-13 08:25:31 +02:00
cbe9a536c0 add TestContainerApiPause case
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 8636a219911536123decb547dab9bf50ebb2c8f8
Component: engine
2015-04-10 09:14:01 +08:00
0d1c1d0efa cleanup/fix integration-cli for overlay in overlay
Signed-off-by: Jessica Frazelle <jess@docker.com>
Upstream-commit: 255b84444a86201995d8f688d71b83822f146c3e
Component: engine
2015-04-08 16:59:36 -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
1e47557825 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: b80fae735684406d848b16a0f148a746e17ed25f
Component: engine
2015-03-24 18:19:59 +01:00
0221549820 Cleanup redundant else statements find via golint #11602
Signed-off-by: George MacRorie <gmacr31@gmail.com>
Upstream-commit: 664ef0cbe2113e8307135e656cc6db9199f8268e
Component: engine
2015-03-23 20:40:29 +00:00
883ebf04a4 Merge pull request #11320 from estesp/fix-daemon-startup
Fix daemon shutdown on error after rework of daemon startup
Upstream-commit: a5269223a78d963774b12359a1e505b10fa9ac81
Component: engine
2015-03-17 19:04:25 -07:00
26ddd6db93 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)
Upstream-commit: 459e58ffc9bff8206a860fb63f973e4f07129756
Component: engine
2015-03-17 14:15:00 -04:00
58d45ba275 Set labels on container create
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: abb5e9a0777469e64fe2c7ecfa66ea01083d2071
Component: engine
2015-03-13 10:02:04 -07:00
182d2d03b5 correct a spelling mistake
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: a02256577ab0806f004e41fd94aaaed52d1aff97
Component: engine
2015-03-12 09:22:51 -04:00
20b7c132ab Merge pull request #11278 from ahmetalpbalkan/win-cli/fakeGIT
integ-cli: use httpserver container for fakeGIT
Upstream-commit: 52f6da223839a5ac1fc003b259b74f6a02fc2858
Component: engine
2015-03-11 18:19:11 -07:00
76ab368c1d 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>
Upstream-commit: e424c54d9c4030dc3290701e8e76add372e09e08
Component: engine
2015-03-11 10:28:56 -07:00
546ad5a411 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>
Upstream-commit: 44ffb199d03f0d63a2c9ad05e9fd03a6a08c594d
Component: engine
2015-03-10 22:48:35 -07:00
60d13dc8cb 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>
Upstream-commit: 2e95bb5f1a65d90f412568d6df82a9e2cdd3e790
Component: engine
2015-03-09 12:03:55 -07:00
de1d7d8288 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>
Upstream-commit: d18689dff71ccbc3b955a4416ae04077356fd5c9
Component: engine
2015-03-07 01:09:01 -08:00
a0531c5103 Merge pull request #11005 from ahmetalpbalkan/win-cli/RegistryV2-skip
integ-cli: skip tests launching registry-v2
Upstream-commit: f92213af882761a739fa0d8408e180e437b1a380
Component: engine
2015-03-02 12:41:21 -08:00
b67ac7ee80 when the file that was opened has been read into buffer, the file should be close.
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: d5ea4bae4a15cc9f3c16c046389737682277ff0f
Component: engine
2015-02-27 19:09:17 +08:00
8c8a1fb3a0 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>
Upstream-commit: e2aa8f0cd984fbb31231240052e5505e1b1e3d2f
Component: engine
2015-02-24 23:19:59 -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
d5362cffa1 Merge pull request #10468 from noironetworks/10457-Pause-and-unpause-accept-multi-containers
Allow docker pause and unpause to accept multiple containers
Upstream-commit: 934535db9c78b20481c8ccabdf174926c6e04d4d
Component: engine
2015-02-19 15:16:05 -08:00
f303319a62 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>
Upstream-commit: ed345fb18ee9d003f30884b696628b75380a426a
Component: engine
2015-02-18 23:30:43 -07:00