Граф коммитов

785 Коммитов

Автор SHA1 Сообщение Дата
Jessie Frazelle 7e9dd94376 Merge pull request #10793 from ahmetalpbalkan/win-cli/TestExportContainerAndImportImage-fix
integration-cli: use cmd.Stdin instead of cat/tee for TestExportContainerAndImportImage
2015-02-16 10:11:47 -08:00
Jessie Frazelle 546f481840 Merge pull request #10795 from ahmetalpbalkan/integration-cli/makeRandomString
integration-cli: Seed rand in makeRandomString
2015-02-16 10:08:20 -08: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
Arnaud Porterie 38ca779dd6 Merge pull request #10747 from ahmetalpbalkan/win-cli/TestContainersAttachWS-fix
TestGetContainersAttachWebsocket: use DOCKER_TEST_HOST if specified
2015-02-16 09:19:54 -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 57d34241fd integration-cli: fix test to use busybox outside container
Fixes TestRmiForceWithExistingContainers test to make it use
`busybox` image rather than /docker-busybox hardcoded path
and rebuilding image.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-14 03:00:38 -08:00
Ahmet Alp Balkan 00cd214afe integration-cli: seed rand in makeRandomString
Current uses of `makeRandomString` is to create really
long strings. In #10794, I used them to create nearly-unique
unix paths for the daemon. Although collions are harmless and
don't fail the tests, this prevents the same strings from being
created consistently in every run by seeding rand.Random.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-13 23:26:08 -08:00
Ahmet Alp Balkan 48d8757700 integration-cli: use cmd.Stdin instead of cat/tee for TestExportContainerAndImportImage
os.Exec("bash", "-c", dockerBinary) ends up making a call like
bash -c c:\...\docker.exe on windows msys shell, which does not work.

This test makes use of exec.Command.Stdin to pass image back to
docker import.

- Upside: fixes the test on windows
- Downside: cat/tee compatibility is no longer tested in this test case

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-13 22:12:06 -08:00
Brian Goff 8f5156e584 Fix race detected in TestExecCgroup
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-02-13 12:18:46 -05:00
Ahmet Alp Balkan 2f53820ce4 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>
2015-02-12 15:42:27 -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
Doug Davis 802802b781 Merge pull request #10727 from ahmetalpbalkan/win-cli/integration-cli-compile-fix
Create builder/command, cut libcontainer dependency on integration-cli
2015-02-12 17:10:16 -05:00
Brian Goff f6e697d2ac 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>
2015-02-12 11:38:52 -05:00
Ahmet Alp Balkan ccde3a1f73 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>
2015-02-11 21:44:31 -08:00
Doug Davis 1654dfdf14 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>
2015-02-10 11:43:45 -08:00
Alexander Morozov d14751bf30 Merge pull request #10671 from tiborvass/remove-fail-word-from-tests
Remove word "fail" from tests
2015-02-09 20:53:15 -08:00
Michael Crosby 7cc76a7fda Merge pull request #10561 from duglin/SupportNoArgCmds
Add support for no-arg commands in Dockerfile
2015-02-09 18:08:14 -08: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
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
Doug Davis d1e9d07c1b Get list of Dockerfile cmds from builder so we can be smarted in our tests
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-08 08:09:02 -08:00
Doug Davis e4f02abb51 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>
2015-02-08 03:36:49 -08:00
Alexander Morozov f208201375 Merge pull request #10607 from chenhanxiao/enable-upper-proto
nat: enable upper case proto
2015-02-07 16:56:35 -08:00
Chen Hanxiao 0552f1a0ca 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>
2015-02-08 07:04:22 +08:00
André Martins ab4bc988bc Fixed one small typo of docker_cli_build_test.go
Signed-off-by: André Martins <martins@noironetworks.com>
2015-02-07 15:37:58 +00:00
Arnaud Porterie c03d6f57b6 Merge pull request #10594 from dmcgowan/v2-registry-tarsum-errors
Update verification message logic
2015-02-06 17:01:34 -08:00
Tibor Vass b0ed2da441 Merge pull request #10112 from cpuguy83/4393_fix_volume_where_file_exists
Error out if file in container at volume path
2015-02-06 19:39:48 -05:00
Jessie Frazelle 271a073a04 Merge pull request #10622 from estesp/10618-err-ondup-bind-vols
Don't allow duplicate `-v` specifications for the same target
2015-02-06 15:03:56 -08:00
Brian Goff c73e3bf4dc Error out if file in container at volume path
Fixes #4393

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-02-06 18:00:00 -05:00
Michael Crosby eb79acd7a0 Merge pull request #10421 from noironetworks/10388-Specifying_confliting_options
Specifying -a and -d to docker run should throw an error
2015-02-06 14:58:08 -08:00
Michael Crosby 9d140fe693 Merge pull request #10105 from LK4D4/remove_tons_of_names
Use graphdb.Walk with depth=1 in /containers
2015-02-06 14:33:26 -08:00
Alexander Morozov b6dc430d99 Merge pull request #10153 from acbodine/api_websocket_test
Adds test for api attach via websocket
2015-02-06 14:29:54 -08:00
Alexander Morozov 2a3225eb82 Test for links names in ps --no-trunc
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-06 14:05:08 -08:00
Phil Estes d1f33d12d4 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)
2015-02-06 17:00:53 -05:00
Tibor Vass a982432c16 Merge pull request #10601 from LK4D4/fix_tag_name_in_ps
Show right tag for container in ps
2015-02-06 16:59:49 -05:00
Tibor Vass 82191cc3f3 Merge pull request #10120 from duglin/TrimSpaces
Remove leading/trailing spaces in builder/parser
2015-02-06 16:25:37 -05:00
Doug Davis 969ba5c7ed 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>
2015-02-06 13:02:58 -08:00
Alexander Morozov e45deceb46 Show right tag for container in ps
Fixes #10599

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-06 11:32:01 -08:00
Doug Davis 3859c48531 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>
2015-02-06 08:52:18 -08:00
Derek McGowan 6088df20c3 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)
2015-02-05 17:46:55 -08:00
Doug Davis 2203b37733 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>
2015-02-04 07:59:16 -08: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
Alexander Morozov 4ee05a4d3e Fix some go vet errors
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-02 14:53:20 -08:00
Michael Crosby 382f187b1a Merge pull request #10455 from ashahab-altiscale/9875-lxc-symlink
Fixes symlink, container size, and kmsg tests
2015-02-02 13:13:27 -08:00
André Martins af90fe6a63 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>
2015-02-02 12:07:52 +00: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
Derek McGowan 403d981d70 Revert client signature
Supports multiple tag push with daemon signature

Fixes #10444

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-30 14:20:32 -08:00
Abin Shahab 29ac29a436 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)
2015-01-30 09:30:42 +00:00
Jessie Frazelle d748ec31d5 Merge pull request #10446 from dmcgowan/defer-key-file-creation
Defer creation of trust key file until needed
2015-01-29 15:23:35 -08:00
Derek McGowan 0eed1f4d8d Defer creation of trust key file until needed
Fixes #10442

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-29 13:46:12 -08:00