Commit Graph

52 Commits

Author SHA1 Message Date
5c70b34f09 validate log-opt when creating containers AGAIN
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 068085005ef378f6320fdce90a67b104399b796d
Component: engine
2016-03-02 20:30:26 +08:00
c3440ba69f validate log-opt when creating containers
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 7285c9a53a6a661e7ded4637d937f9d20dcf46c0
Component: engine
2016-02-28 01:51:46 +08:00
534b2f0779 Vendor in notary v0.2.0
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 84dc2d9e70f1ad4422732421e2d6b91274f4dfae
Component: engine
2016-02-25 13:40:00 -08:00
3e36908d7b Add a getPrefixAndSlashFromDaemonPlatform …
… to limit code duplication in integration tests :P

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 382c96ee7b02f393e7515e4cc4882738398b86a6
Component: engine
2016-02-03 15:16:00 +01:00
c3a476e4f1 Windows CI: TestCreate* porting
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5e3fdd3c20900b5db5895fee85f5ff11744a9bea
Component: engine
2016-02-02 16:00:39 -08:00
8bc92ae008 Assert error in body of function inspectField*
1. Replace raw `docker inspect -f xxx` with `inspectField`, to make code
cleaner and more consistent
2. assert the error in function `inspectField*` so we don't need to
assert the return value of it every time, this will make inspect easier.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 62a856e9129c9d5cf7db9ea6322c9073d68e3ea4
Component: engine
2016-01-29 23:39:07 +08:00
142063ee1c Update integration tests with new error messages, and to use different repos per test.
This way we won't encounter any problems with one test using cached data from a different
test.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 0617521ba2ce160899852bb707c15bae7309f18a
Component: engine
2016-01-26 18:02:00 -08:00
9952183b81 revendor notary and wrap friendlier error messages
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: dd7436c832a5dd777d0276c3e3b1819062b86ebc
Component: engine
2016-01-14 20:35:59 -08:00
980beea08a Merge pull request #19155 from coolljt0725/create_cwd_on_create
Create the working directory on container creation
Upstream-commit: a225e39667d7ddd2345326bc5cd3b1ce15fd0bad
Component: engine
2016-01-14 09:13:44 -08:00
1ce594cbcd update tests and error messages, revendor notary with tag
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 1c32a66877f2ddc3f1cce66d78c69e032d6cf795
Component: engine
2016-01-08 09:11:33 -08:00
b2c99ad7af Create the working directory on container creation
if create a container with -w to specify the working directory and
the directory does not exist in the container rootfs, the directory
will be created until the container start. It make docker export of
a created container and a running container inconsistent.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: cde0ed67a14e3983ba83af8c75434558c865b2bc
Component: engine
2016-01-08 12:11:21 +08:00
b741751f8d Notary delegation integration into docker
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 1c125f50cfce422b19a15e84c5a3940890fb2e23
Component: engine
2016-01-07 19:35:45 -08:00
b006691148 Replace usage of pkg/nat with go-connections/nat.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 056e7449039af522fa0a1567ef67916eaa0de93e
Component: engine
2015-12-22 13:31:46 -05:00
d17a157710 Improve reference parse errors
Fixes #18093

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 15d84a3a48efa12ed8bdc500f28ca58a7b1d1083
Component: engine
2015-12-16 11:58:53 -08:00
e105a29374 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4352da7803d182a6013a5238ce20a7c749db979a
Component: engine
2015-11-24 09:40:25 -08:00
a6b34b6717 changed if else statements to c.Asserts in docker_cli_create_test.go.
Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
Upstream-commit: 91041884f858087aafbf02fc456d9d1488e03c30
Component: engine
2015-11-10 23:15:32 -08:00
5b46df94e1 Merge pull request #15503 from ibuildthecloud/revert-label
Revert "Container don't inherit from image labels"
Upstream-commit: b0cbc0228380517ebc5248905f92f6898ea38289
Component: engine
2015-10-12 10:03:18 -07:00
29fa44dc8c add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: ea3afdad612448fc6eefcc4bdd63563be8f16946
Component: engine
2015-10-09 20:50:27 -04:00
1e38e54eff Add STOPSIGNAL instruction to dockerfiles.
This way, images creators can set the exit signal their programs use.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3781cde61ff10b1d9114ae5b4c5c1d1b2c20a1ee
Component: engine
2015-09-10 19:56:05 -04:00
c03ccb6893 Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f9a3558a9d75ed6a2f9f1b2d80800226afaa74a5
Component: engine
2015-09-04 12:32:40 -07:00
e87b5d1d77 integration-cli: fix printf verbs of wrong types
Signed-off-by: Soshi Katsuta <katsuta_soshi@cyberagent.co.jp>
Upstream-commit: 5759b95e7e7c269af48a095773961ed8d13f8798
Component: engine
2015-08-19 17:47:33 +09:00
97fd95aa75 Revert "Container don't inherit from image labels"
This reverts commit 79621c7728ab83292ffd94d005f10ccebfba055b.

Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 8b91b3cf77ca5a7eb977af7bfa70694814e3f20b
Component: engine
2015-08-11 17:01:57 -07:00
4c1bdea55d Skip notary tests which update system clock
Currently some notary tests change the system clock to check for expiration.
Skip these tests until the code can be refactored to not rely on updating the system clock.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: bf3c1e6a3afc951e41643b8d55d4ac25fa9cb06d
Component: engine
2015-07-29 12:09:40 -07:00
99a373ceb8 Rename to flags and environment variables to content trust
Update help line to allow 90 characters instead of 80

The trust flag pushes out the help description column wider, requiring more room to display help messages.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 259cadb0b19a9049302e78fec529b0105efabb1d
Component: engine
2015-07-24 16:31:18 -07:00
e5887c6923 Added tests for expired snapshots and timestamps
Signed-off-by: Diogo Monica <diogo@docker.com>
Upstream-commit: 3e90b12d42f6f937639edafa4b2ddc12badf8895
Component: engine
2015-07-24 16:31:18 -07:00
937cba2db1 Add tests simulating an evil server
Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
Upstream-commit: 268fa5af4768f7b1df32501d5f7ba0daba2c2da1
Component: engine
2015-07-24 16:31:18 -07:00
97834446bf 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)
Upstream-commit: 871d2b96ed5cf234c41a5e731a34fc9deda4e9f1
Component: engine
2015-07-24 16:31:12 -07:00
08efdea505 Add test for incorrect nonroot passphrase
Fix failing tests for create, push, and pull

Signed-off-by: Diogo Monica <diogo@docker.com>
Upstream-commit: eeb6d0a71b754c1c99748f7ba08be27e4d8b8eb9
Component: engine
2015-07-24 14:08:20 -07:00
be6fe06878 Add trust tests for Docker create, run, push, and pull
Created date util function

Signed-off-by: Nathan McCauley <nathan.mccauley@docker.com>
Upstream-commit: 1406cb35fd814a987b91f92ed1a4b61a21205736
Component: engine
2015-07-24 14:08:20 -07:00
b821d19c27 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>
Upstream-commit: 1c3cb2d31ea722e2c174bf78eda62fec6949fb8b
Component: engine
2015-07-21 15:33:05 -07:00
abe73960d5 Use dockerCmd when possible (#14603)
- integration-cli/docker_cli_attach_test.go
- integration-cli/docker_cli_attach_unix_test.go
- integration-cli/docker_cli_build_test.go
- integration-cli/docker_cli_build_unix_test.go
- integration-cli/docker_cli_by_digest_test.go
- integration-cli/docker_cli_commit_test.go
- integration-cli/docker_cli_config_test.go
- integration-cli/docker_cli_cp_test.go
- integration-cli/docker_cli_create_test.go
- integration-cli/docker_cli_pause_test.go
- integration-cli/docker_cli_port_test.go
- integration-cli/docker_cli_port_unix_test.go
- integration-cli/docker_cli_proxy_test.go
- integration-cli/docker_cli_ps_test.go
- integration-cli/docker_cli_pull_test.go
- integration-cli/docker_cli_push_test.go

- docker_api_attach_test.go
- docker_api_containers_test.go
- docker_api_events_test.go
- docker_api_exec_resize_test.go
- docker_api_exec_test.go
- docker_api_images_test.go
- docker_api_info_test.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5c295460da2098d971eda28a73b416ff6be62f53
Component: engine
2015-07-14 21:52:43 +02:00
9161e24479 Move /nat to /pkg/nat
By convention /pkg is safe to use from outside the docker tree, for example
if you're building a docker orchestrator.

/nat currently doesn't have any dependencies outside of /pkg, so it seems
reasonable to move it there.

This rename was performed with:

```
gomvpkg -vcs_mv_cmd="git mv {{.Src}} {{.Dst}}" \
	-from github.com/docker/docker/nat \
        -to   github.com/docker/docker/pkg/nat

```

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 9c2374d19623581028f070bc93fa4c60a660dce4
Component: engine
2015-06-30 17:43:17 +01:00
4dfff4ae36 Container don't inherit from image labels
Labels are metadata that apply to a particular resource: image,
container, maybe volumes and networks in the future. We shouldn't have
containers inherit from its image labels: they are not the same obejcts,
and labels cannot be interpreted in the way.

It remains possible to apply metadata to an image using the LABEL
Dockerfile instruction, to query them using `docker inspect <img>`, or
to filter images on them using `docker images --filter <key>=<value>`.

Fixes #13770.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 79621c7728ab83292ffd94d005f10ccebfba055b
Component: engine
2015-06-05 11:11:22 -07:00
4bdf86ad9b Don't check running container at create time
We should let user create container even if the container he wants
join is not running, that check should be done at start time.

In this case, the running check is done by getIpcContainer() when
we start container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 84aae5a22605f8849e7335157afeca471b563a29
Component: engine
2015-05-23 07:15:14 +08:00
aa89cbdb44 Add a 'docker create' + 'docker rm' testcase
Per @thaJeztah's comment here: https://github.com/docker/docker/pull/13367#issuecomment-104286651
I couldn't find an existing test that covered this.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 012e588a744ce3000d58a7562a1a8291a7fe10ae
Component: engine
2015-05-21 07:30:51 -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
dd4b0467ca Remove deleteAllContainers call in test
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: ee7a7b07e752c56bbe1b941feb1e4313275d68c2
Component: engine
2015-04-23 16:32:50 +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
a8ff8c9aa8 Move TestCreateNumberHostname to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2c24a8a4ea7ea0571cd4e125158fa59f584d2464
Component: engine
2015-04-13 16:40:48 -04: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
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
55588c146b Last three tests skip on lxc.
Now we can scale lxc tests to all PRs.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 321874f37672b2424a7609caa1aac616b3b23c6a
Component: engine
2015-03-04 06:04:25 -08:00
f24c530c74 integ-cli: Skip tests assuming daemon/cli are on the same host
Some integration-cli tests assume daemon and cli are running
on the same machine and therefore they examine side effects
of executed docker commands on docker host by reading files
or running other sort of commands.

In case of windows/darwin CLI tests these provide little
or no value and should be OK to skip.

List of skipped tests:
- `TestContainerNetworkMode`
- `TestCpVolumePath`
- `TestCreateVolumesCreated`
- `TestBuildContextCleanup`
- `TestBuildContextCleanupFailedBuild`
- `TestLinksEtcHostsContentMatch`
- `TestRmContainerWithRemovedVolume`
- `TestRunModeIpcHost`
- `TestRunModeIpcContainer`
- `TestRunModePidHost`
- `TestRunNetHost`
- `TestRunDeallocatePortOnMissingIptablesRule`
- `TestRunPortInUse`
- `TestRunPortProxy`
- `TestRunMountOrdering`
- `TestRunModeHostname`
- `TestRunDnsDefaultOptions`
- `TestRunDnsOptionsBasedOnHostResolvConf`
- `TestRunResolvconfUpdater`
- `TestRunVolumesNotRecreatedOnStart`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: b686b65c9b5f5eabc7a618faf0055aff06e4c0c4
Component: engine
2015-02-23 14:08:05 -08:00
0f72ec16db 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>
Upstream-commit: 70407ce40ca98d763da8472e7ee94b6e8d66912d
Component: engine
2015-02-20 14:04:36 -08:00
986d8f11d2 add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 2338a9cf5a1ba5576b92e49065335a9c9251ade0
Component: engine
2015-01-02 23:21:26 +00:00
b108f27ddc Fix tests with old cmd function.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: e201d5bcd46a3dcb70dd6b6e23ee375e4b5b5f40
Component: engine
2014-12-03 15:53:19 -08:00
c8b11faf50 Initialize volumes when container is created
Fixes #8942
Current behavior is that volumes aren't initialized until start.
Volumes still need to be initialized on start since VolumesFrom and
Binds can be passed in as part of HostConfig on start, however anything
that's already been initialized will just be skipped as is the current
behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7107898d5cf0f86dc1c6dab29e9dbdad3edc9411
Component: engine
2014-11-14 11:37:03 -05:00
fb004016c8 Cleanup errorOut resp in create test
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 6b858b59ed6e1f594e5552e3f5e8f46351466d78
Component: engine
2014-10-16 15:05:00 -07:00
be07c0e702 Replace '%s' in create tests
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 91f33fcaaaa47ef60acc4a8cfa7a2be41edd724e
Component: engine
2014-10-14 10:58:35 -07:00