1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

19 commits

Author SHA1 Message Date
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
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
Doug Davis
a853f8e468 Fixup a test for -f processing
Thanks to @ahmetalpbalkan for noticing... we had an old check in this
testcase that no longer applied (due to stuff being removing recently).
However, while in there I added a check to make sure that the file referenced
by the query parameter isn't used at all.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-10 05:47:12 -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
Jessie Frazelle
beea697be3 Merge pull request #10858 from duglin/10807-MixedcaseDockerfile
Support dockerfile and Dockerfile
2015-03-04 03:52:49 -08:00
Doug Davis
15924f2385 Support dockerfile and Dockerfile
Closes #10807

Adds support for `dockerfile` ONLY when `Dockerfile` can't be found.
If we're building from a Dockerfile via stdin/URL then always download
it a `Dockerfile` and ignore the -f flag.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-03 18:38:50 -08:00
Michael Crosby
7fed7d7eb4 Move stats api types into api/types package
Move the stats structs from the api/stats package into a new package
api/types that will contain all the api structs for docker's api request
and responses.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-02-24 10:47:47 -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
Ahmet Alp Balkan
df5334183f integration-cli: generate unix-style volume paths
Some tests in `docker_api_containers_test.go` assume the
docker daemon is running at the same machine as the cli
and uses `ioutil.TempDir` to create temp dirs and use them
in the test.

On windows ioutil.TempDir and os.TempDir would create win-style
paths and pass them to daemon. Instead, I hardcoded `/tmp/` and
generate some random path manually and allow daemon to create
the directory.

Fixes tests:
- TestContainerApiStartVolumeBinds
- TestContainerApiStartDupVolumeBinds
- TestVolumesFromHasPriority

Downside:
- Does not clean the temp dirs generated on the remote daemon
  machine unless delete container deletes them.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-17 01:29:23 -08:00
Phil Estes
35d4825838 Clean up dup. volume test and add API test for the same
Handles missed comments in PR#10622 and adds an API test to validate
error returned properly for duplicate bind mounts for the same
container target path.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-02-09 12:33:58 -05:00
Tibor Vass
73d5baf585 builder: prevent Dockerfile to leave build context
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-02-02 23:40:24 -08: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
Michael Crosby
4d7707e183 Improve robustness of /stats api test
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-21 16:00:15 -08:00
Michael Crosby
217a2bd1b6 Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Michael Crosby
76141a0077 Add documentation for stats feature
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Brian Goff
d44c9f9147 Fix volumes-from/bind-mounts passed in on start
Fixes #9628
Slightly reverts #8683, HostConfig on start is _not_ deprecated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-12-15 16:51:15 -05: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
Michael Crosby
ba5370c116 Fix racy integration tests
Do not run containers in the background in the integration tests if you
depend on the run completing.  It is better especially if you just want
to ensure that the run has completed with a `true` to just run in
foreground and use a known name for the container to query it after it
has stopped.

The failures can be reproduced on most machines by giving your dind
container one core and a cpushare.

docker run -c 200 --cpuset 0 -ti --rm --privileged -e
DOCKER_GRAPHDRIVER=vfs docker hack/make.sh binary test-integration-cli

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-21 22:51:09 +00:00
Phil Estes
d8cd8165a9 Migrate container GET API tests from integration to integration-cli
An initial start to migration of the API tests from integration to
the integration-cli model.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
(github: estesp)
2014-10-16 17:34:28 -04:00