Commit Graph

776 Commits

Author SHA1 Message Date
b8d956b4d4 Fix race detected in TestExecCgroup
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8f5156e584233f3e83cfc889583fa016aabfeea9
Component: engine
2015-02-13 12:18:46 -05:00
01e622e5b7 TestBuildAddTarXz: xz with '-k' due to msys bug
TestBuildAddTarXz/TestBuildAddTarXzGz make exec calls like
'cd %SOME_TEMP_DIR%; xz test.gz' but this fails when called
from integration-cli tests (doesn't fail from msys or cmd shell).

It fails with error: "xz: test.tar: Cannot remove: Permission denied."
Proposing workaround of using the `xz --keep` argument since keeping
test.tar is harmless and it's already in os.TempDir().

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 2f53820ce409ce1afb6513b7799d094b9c53779d
Component: engine
2015-02-12 15:42:27 -08:00
3799fccfba Merge pull request #10727 from ahmetalpbalkan/win-cli/integration-cli-compile-fix
Create builder/command, cut libcontainer dependency on integration-cli
Upstream-commit: 802802b7812b7c73aefec4e922cad82f8dcddd4c
Component: engine
2015-02-12 17:10:16 -05:00
106678e894 Do not use HTTP_PROXY for unix sock
Makes sure the CLI does not use HTTP_PROXY when connecting to unix
socket.
Also adds some tests to make sure this functionality works as expected.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f6e697d2ace2ea659c1b3f7e3dcef7493baa481c
Component: engine
2015-02-12 11:38:52 -05:00
b2dfebba9a Create builder/command, cut libcontainer dependency on integration-cli
d1e9d07c introduces a dependency to libcontainer and other daemon
related packages through builder package. The only thing test needs
is set of the Dockerfile commands. Extracting them to a separate
package.

This was causing CI tests to not to compile on non-Linux platforms.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: ccde3a1f73bb4f64845e736d3173eb6f6935971f
Component: engine
2015-02-11 21:44:31 -08:00
b185b43330 Show err msg on empty 'scratch' Dockerfile
If you have a Dockefile with just:
   FROM scratch

An error is generated but its never shown to the CLI. This PR fixes that.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 1654dfdf146df42a1271696c0290027460cce59a
Component: engine
2015-02-10 11:43:45 -08:00
64a4aefa3d Merge pull request #10671 from tiborvass/remove-fail-word-from-tests
Remove word "fail" from tests
Upstream-commit: d14751bf30a70abe7bc6048af61848eed32ca140
Component: engine
2015-02-09 20:53:15 -08:00
1ebda39c1c Merge pull request #10561 from duglin/SupportNoArgCmds
Add support for no-arg commands in Dockerfile
Upstream-commit: 7cc76a7fda2b039a68aa1e1612474e2c4c0c5821
Component: engine
2015-02-09 18:08:14 -08: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
123e8eff11 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)
Upstream-commit: 35d48258384a07affac6f49b89a70dd7ffa60428
Component: engine
2015-02-09 12:33:58 -05:00
4413092410 Get list of Dockerfile cmds from builder so we can be smarted in our tests
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d1e9d07c1b09a145b881a7ee6d58cc2e860167c8
Component: engine
2015-02-08 08:09:02 -08:00
d3182181ac Add support for no-arg commands in Dockerfile
We're hoping to add some new commands that don't have any args so this
PR will enable that by removing all of the hard-coded checks that require
commands to have at least one arg.  It also adds some checks to each
command so we're consistent in the error message we get.  Added a test
for this too.

We actually had this check in at least 3 different places (twice in the
parser and once in most cmds), this removes 2 of them (the parser ones).

Had to remove/modify some testcases because its now legal to have certain
commands w/o args - e.g. RUN. This was actually inconsistent because
we used to allow "RUN []" but not "RUN" even though they would generate
(almost) the same net result.  Now we're consistent.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: e4f02abb51534e560311b0afcfb7b586d9587e67
Component: engine
2015-02-08 03:36:49 -08:00
31dee84599 Merge pull request #10607 from chenhanxiao/enable-upper-proto
nat: enable upper case proto
Upstream-commit: f208201375278e0e572d2a7f5a57e5c8b2ee1e4b
Component: engine
2015-02-07 16:56:35 -08:00
417c803e58 docker_cli_build_test: add testcase of EXPOSE 5678/UDP
test whether we could use upper case proto in EXPOSE

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Upstream-commit: 0552f1a0caf8f8e57736d05c2ed42f82e97df5f6
Component: engine
2015-02-08 07:04:22 +08:00
4f7caf8a2c Fixed one small typo of docker_cli_build_test.go
Signed-off-by: André Martins <martins@noironetworks.com>
Upstream-commit: ab4bc988bcf2aae34c27be7e91d86a4c63a1af8d
Component: engine
2015-02-07 15:37:58 +00:00
ffcc4076f8 Merge pull request #10594 from dmcgowan/v2-registry-tarsum-errors
Update verification message logic
Upstream-commit: c03d6f57b6956f305a9afcbdc530a15bbe729fce
Component: engine
2015-02-06 17:01:34 -08:00
d6536422f4 Merge pull request #10112 from cpuguy83/4393_fix_volume_where_file_exists
Error out if file in container at volume path
Upstream-commit: b0ed2da4418d62d2d7b940b49e0e89bdcd264569
Component: engine
2015-02-06 19:39:48 -05:00
df52d83f51 Merge pull request #10622 from estesp/10618-err-ondup-bind-vols
Don't allow duplicate `-v` specifications for the same target
Upstream-commit: 271a073a04cdffbeda5f83d2d227c5e8c5f8ae86
Component: engine
2015-02-06 15:03:56 -08:00
a3cae1498c Error out if file in container at volume path
Fixes #4393

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c73e3bf4dc0382cd188db3e51c52eaf8bf605795
Component: engine
2015-02-06 18:00:00 -05:00
acc900171e Merge pull request #10421 from noironetworks/10388-Specifying_confliting_options
Specifying -a and -d to docker run should throw an error
Upstream-commit: eb79acd7a0db494d9c6d1b1e970bdabf7c44ae4e
Component: engine
2015-02-06 14:58:08 -08:00
2793f9f606 Merge pull request #10105 from LK4D4/remove_tons_of_names
Use graphdb.Walk with depth=1 in /containers
Upstream-commit: 9d140fe693a221cd19857c1232da66c52df51c9b
Component: engine
2015-02-06 14:33:26 -08:00
01d71dc709 Merge pull request #10153 from acbodine/api_websocket_test
Adds test for api attach via websocket
Upstream-commit: b6dc430d995acd34958c2b1b7becd2e0f473c5a7
Component: engine
2015-02-06 14:29:54 -08:00
13f02d612c Test for links names in ps --no-trunc
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 2a3225eb82274d245c25fc6191945dde1f25f668
Component: engine
2015-02-06 14:05:08 -08:00
b33f390dce Don't allow duplicate -v specifications for the same target
Addresses: #10618

Given that the user has no notification that they tried to bind mount
different directories on the same target in the container, this errors
out in that case, without changing the current code allowing for
--volumes-from to trump -v/VOLUME specifications.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: d1f33d12d4126aae80c51ab1075a5b8323a5f957
Component: engine
2015-02-06 17:00:53 -05:00
29804755f7 Merge pull request #10601 from LK4D4/fix_tag_name_in_ps
Show right tag for container in ps
Upstream-commit: a982432c16ffb3c823530e00b84b7c7676802f24
Component: engine
2015-02-06 16:59:49 -05:00
eba231efa0 Merge pull request #10120 from duglin/TrimSpaces
Remove leading/trailing spaces in builder/parser
Upstream-commit: 82191cc3f3b3ea49da6287abdb9c2ba6eb6d253c
Component: engine
2015-02-06 16:25:37 -05:00
a8f9224e85 Make checking of help text smarter
As I was reworking https://github.com/docker/docker/pull/9402 I realized
that the new testcase I just added that verified all help text is within
80 characters really should be smarter and ask "docker help" for the list
of commands to check instead of having a hard-coded list.  This way
it will catch "docker execwait" automagically once #9402 is merged.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 969ba5c7edfdca1d97a836e9549d80ce547a86a0
Component: engine
2015-02-06 13:02:58 -08:00
915f96f67c Show right tag for container in ps
Fixes #10599

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e45deceb462351f841aa077819fdef3166381c50
Component: engine
2015-02-06 11:32:01 -08:00
7b03f17d1a Remove leading/trailing spaces in builder/parser
Per Erikh's suggestion at:
https://github.com/docker/docker/pull/9989#issuecomment-69832009
this PR will trim spaces in the parser to ensure that the user gets the same
results irrespetive of leading/trailing spaces.

Per @tiborvass's suggestion I added a test to make sure spaces in quotes
are not touched.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 3859c485317a395de1e8eb48270d0e3b1207a204
Component: engine
2015-02-06 08:52:18 -08:00
e071644a3f Update verification message logic
Only show the verification message if all the tarsum checks pass and the image manifest is verified.
No longer return an error when a tarsum verification fails, just reset the verification flag.
Tarsum verification is less meaningful without a verified manifest and therefore it should not cause an error.
Updated the verified image test to pull an image which expected to have a verified manifest and contents.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 6088df20c33afafa523b9dd9b0acdd3b987c4534
Component: engine
2015-02-05 17:46:55 -08:00
013dbb146f Pretty the help text
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line. This will also try to use ~ when
possible

Added a test to make sure we don't go over 80 chars again.
Added a test to make sure we use ~

Applied rules/tests to all docker commands - not just main help text

Closes #10214

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2203b37733e76d653cfe3b0ec5870786076adce7
Component: engine
2015-02-04 07:59:16 -08:00
3ba1373e01 builder: prevent Dockerfile to leave build context
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 73d5baf585e3ef55864abeef43d45fe0b3a1c2bc
Component: engine
2015-02-02 23:40:24 -08:00
56a2a654e8 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>
Upstream-commit: 198ff76de59a600ce900497fd4a6131ee4448c48
Component: engine
2015-02-02 23:40:20 -08:00
3ae87a3a28 Fix some go vet errors
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 4ee05a4d3e6f9ad955d96075a1e63d59ed73ac78
Component: engine
2015-02-02 14:53:20 -08:00
c8bbb49221 Merge pull request #10455 from ashahab-altiscale/9875-lxc-symlink
Fixes symlink, container size, and kmsg tests
Upstream-commit: 382f187b1a4d038b45d0e7965a0af8e158a2e9da
Component: engine
2015-02-02 13:13:27 -08:00
ebc844c8a7 Fixes #10388
The cmd.Lookup should be "-attach" and not "attach", as seen in
docker/docker/runconfig/parse.go

Signed-off-by: André Martins <martins@noironetworks.com>
Upstream-commit: af90fe6a633be3a5bff4d20b0a59b9189a171176
Component: engine
2015-02-02 12:07:52 +00:00
0820460272 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>
Upstream-commit: de8ea06d7dab7c5278f84728f7e0aa69e3301ad0
Component: engine
2015-01-31 11:31:41 -08:00
12b02aa7f6 Revert client signature
Supports multiple tag push with daemon signature

Fixes #10444

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 403d981d70dc8a493a9a10be4b5d2e2ce871f380
Component: engine
2015-01-30 14:20:32 -08:00
764888405b Fixes symlink, container size, and kmsg tests
Changes symlink, container size and kmsg tests to account for lxc driver.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: 29ac29a4361e0392979ad6a99341bff174f76967
Component: engine
2015-01-30 09:30:42 +00:00
78452ce653 Merge pull request #10446 from dmcgowan/defer-key-file-creation
Defer creation of trust key file until needed
Upstream-commit: d748ec31d5f89f4cbe363ac9b38310906bf2a9e0
Component: engine
2015-01-29 15:23:35 -08:00
eb1117987a Defer creation of trust key file until needed
Fixes #10442

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0eed1f4d8da893d7c91be811197032a064053155
Component: engine
2015-01-29 13:46:12 -08:00
09a29b4b64 Merge pull request #10368 from jfrazelle/lingering-exec-test
Move one last exec test :)
Upstream-commit: fb9363eb2a859684aefc46d5854f05ed02e74bcf
Component: engine
2015-01-28 21:21:05 -05:00
c60988becd Merge pull request #10123 from duglin/Issue10097
Build CMD/ENTRYPOINT cache strings properly
Upstream-commit: 70fbd45a5c88f6f39a07b04f81a07721bf5f3eed
Component: engine
2015-01-28 14:43:16 -05:00
e7f0104567 Move one last exec test :)
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 6a2c6e971d8b760931402e15513e91c71cba4b72
Component: engine
2015-01-26 17:17:08 -08:00
c124b59c51 Do not return err on symlink eval
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b54305ae2330bcadd2ef657a17f4a87896031d1f
Component: engine
2015-01-26 15:22:32 -05:00
68915fde41 Merge pull request #10335 from euank/EmptyLayerConfig
Allow empty layer configs in manifests
Upstream-commit: 74014e4a92fc600259605e4201ea6a70b4e623d3
Component: engine
2015-01-26 11:53:36 -08:00
00cef48e11 Merge pull request #10295 from ashahab-altiscale/9875-lxc-exit-code
Adds ipc namespace capability to lxc, and fixes tests.
Upstream-commit: 364c64cf1aa912ea8197caa6b23b96e20ead64fb
Component: engine
2015-01-26 11:21:48 -08:00
3bf93236d1 Allow empty layer configs in manifests
Before the V2 registry changes, images with no config could be pushed.
This change fixes a regression that made those images not able to be
pushed to a registry.

Signed-off-by: Euan Kemp <euank@euank.com>
Upstream-commit: d477d42dd3e6a98f82c6ed2abb1dfeeb2782539f
Component: engine
2015-01-24 14:27:37 -08: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
34351a6734 Add build flag to exec test.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: ecdbc1a0aff40fa28389d1971528641e2824e5a9
Component: engine
2015-01-23 16:18:39 -08:00