Commit Graph

474 Commits

Author SHA1 Message Date
03dc500ba7 Merge pull request #34509 from thaJeztah/fix-network-delete
Fix network name masking network ID on delete
Upstream-commit: 0181eb8f213284b0fae754f28123076c5cab9be4
Component: engine
2017-10-13 08:40:09 -07:00
817827c1bc Test & Fix build with rm/force-rm matrix
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: 172e73a1dfb894c54fdc93fa6ef338eb1374d06c
Component: engine
2017-10-12 10:22:40 +02:00
33fa7572b6 Fix network name masking network ID on delete
If a network is created with a name that matches another
network's ID, the network with that name was masking the
other network's ID.

As a result, it was not possible to remove the network
with a given ID.

This patch changes the order in which networks are
matched to be what we use for other cases;

1. Match on full ID
2. Match on full Name
3. Match on Partial ID

Before this patch:

    $ docker network create foo
    336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b

    $ docker network create 336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b
    4a698333f1197f20224583abce14876d7f25fdfe416a8545927006c315915a2a

    $ docker network ls
    NETWORK ID          NAME                                                               DRIVER              SCOPE
    4a698333f119        336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b   bridge              local
    d1e40d43a2c0        bridge                                                             bridge              local
    336717eac9ea        foo                                                                bridge              local
    13cf280a1bbf        host                                                               host                local
    d9e4c03728a0        none                                                               null                local

    $ docker network rm 336717eac9eaa3da6557042a04efc803f7e8862ce6cf96f6b9565265ba5c618b
    4a698333f1197f20224583abce14876d7f25fdfe416a8545927006c315915a2a

    $ docker network ls
    NETWORK ID          NAME                DRIVER              SCOPE
    d1e40d43a2c0        bridge              bridge              local
    336717eac9ea        foo                 bridge              local
    13cf280a1bbf        host                host                local
    d9e4c03728a0        none                null                local

After this patch:

    $ docker network create foo
    2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835

    $ docker network create 2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835
    6cbc749a529cd2d9d3b10566c84e56c4203dd88b67417437b5fc7a6e955dd48f

    $ docker network ls
    NETWORK ID          NAME                                                               DRIVER              SCOPE
    6cbc749a529c        2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835   bridge              local
    166c943dbeb5        bridge                                                             bridge              local
    2d1791a7def4        foo                                                                bridge              local
    6c45b8aa6d8e        host                                                               host                local
    b11c96b51ea7        none                                                               null                local

    $ docker network rm 2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835
    2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835

    $ docker network ls
    NETWORK ID          NAME                                                               DRIVER              SCOPE
    6cbc749a529c        2d1791a7def4e2a1ef0f6b83c6add333df0bb4ced2f196c584cb64e6bd94b835   bridge              local
    166c943dbeb5        bridge                                                             bridge              local
    6c45b8aa6d8e        host                                                               host                local
    b11c96b51ea7        none                                                               null                local

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e52001c56e12e4fc63fb5d89ef919295d6ddd5d5
Component: engine
2017-10-11 21:57:05 +02:00
68a51d42bd Merge pull request #34941 from dsheets/authz-tests-api-port
integration/plugin/authz: port tests from integration-cli
Upstream-commit: fe33ea9b0e5a295118feee0f46f45d92f8cc6103
Component: engine
2017-10-11 16:15:56 +02:00
63ac4b5569 Skip all testdata in integration
Also skip.IfCondition directly from the test, so that the skip message is correct

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 104c1c68438c5c59ab0e7a5fb2da6bae4ce6d080
Component: engine
2017-10-02 17:02:52 -04:00
4b75060b8c integration/plugin/authz: inline CLI work-alike library
I strongly disagree with the design of this pull request.

Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 1574d91463efd4741c2f6620718abdb624967584
Component: engine
2017-10-02 14:20:59 +01:00
8ebec737fa integration/plugin/authz: port tests from integration-cli
Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 928b0631c96ae5cb0105b3bf42d43ba529a14aa1
Component: engine
2017-10-02 14:20:59 +01:00
57c6d20473 Merge pull request #34358 from ripcurld0/fix_link_problem
Add an integration test for bug #31392 regression
Upstream-commit: 584ed9603b4cb79160d0dd8689cdbbdedb9fe00f
Component: engine
2017-09-26 18:41:08 +02:00
ec4868350d Add an integration test for bug #31392 regression
This verifies that bug #31392 won't surface again.

To reproduce the bug:
1) docker run -dit --name a0 busybox sh
2) docker run -dit --name b0 --link a0 busybox sh
3) docker rename a0 a1
4) docker run -dit --name a0 busybox sh
5) docker rm -f b0
6) docker run -dit --name b0 --link a0 busybox sh

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 48a26ba9e42f25ebc1ad732b4c0d31e77a7aaa55
Component: engine
2017-09-26 10:55:59 +03:00
522e6cc8ec Do not use deprecated call for APIClient
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 82440a039f58b6a1487f8042486fe8dba675df54
Component: engine
2017-09-25 14:08:03 +02:00
0b2721b9c1 Protect environment for system integration tests
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: d43dac2202667a407f4c5ab061c04b0ea334aa20
Component: engine
2017-09-25 14:05:18 +02:00
da0223d365 Set integration test OSType with environment variable
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: f0e5b3d7d89c0c87d001faa18bc60fd1b4531901
Component: engine
2017-09-20 19:50:17 +02:00
1cc4bb63c2 Merge pull request #34856 from dnephin/cleanup-version-tests
Replace old version tests
Upstream-commit: 7cd7cf9167fd4bc57889dfe01447f4bb0d52acc2
Component: engine
2017-09-19 10:34:50 +02:00
7ac80a2691 Merge pull request #34674 from pradipd/windows_routingmesh
Enabling ILB/ELB on windows using per-node, per-network LB endpoint.
Upstream-commit: a2ee40b98c281139c75b38e0e11aa35726021169
Component: engine
2017-09-18 15:56:17 -07:00
61af2a7b87 Enabling ILB/ELB on windows using per-node, per-network LB endpoint.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 9bed0883e762181ad6c4d5607ae2228e164e44b5
Component: engine
2017-09-18 20:27:56 +00:00
d8ebaa5838 Replace old version tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 813d2e082a094d11bda0d0f5a708ce30805ab28e
Component: engine
2017-09-15 12:56:09 -04:00
44733ed80a Fixes after dnephin review
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 7dabed019a7aac9b317b586d582431eef3b65e33
Component: engine
2017-09-14 19:27:09 +02:00
16788ee2e5 Protect entire environment when testing
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 063c89c71fd1fbeb7ef7c46f43ee805b620e7136
Component: engine
2017-09-14 19:27:09 +02:00
58ef7a0132 Fix integration suite and propagate failures
Failures from the integration suite were not propagating to the outter shell
for some reason. Handle the failure with an if exit 1.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 96707bc600747257e82917ca079fa5006d636b2c
Component: engine
2017-09-01 13:07:47 -04:00
9f71faec7e Refactor test environment
split all non-cli portions into a new internal/test/environment package

Set a test environment on packages instead of creating new ones.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f85ef42ea538911c82821ab6cc0166d492e9a379
Component: engine
2017-08-30 13:13:18 -04:00
55ca4eff51 Merge pull request #33684 from dnephin/update-service-ps-tests
Update service ps to be an API test
Upstream-commit: 15b8d0420b57776028875dbf89fc6d9dbb0666e2
Component: engine
2017-08-29 09:44:20 +02:00
1057cf80e4 Replace service ps cli tests with service inspect API test.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6cd6d8646a90fa2013416bc8f11bd78d72c4180d
Component: engine
2017-08-25 17:27:41 -04:00
9cb0439501 Move ErrorContains to an internal package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e62b2d410cda6ac9166ac8d052fd3fb99a9460bf
Component: engine
2017-08-25 12:04:58 -04:00
b63db0a43c move api test client setup to a package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c66c0447efe9c7e7afdcf75b950897c67894256b
Component: engine
2017-08-09 11:02:57 -04:00
e443662141 Protect images in the integration/ suite
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5fa134b9061d0b794e9e5b887a8ea4ee15fecb61
Component: engine
2017-08-09 11:02:57 -04:00
43db8c0c15 Introduce test-integration target (and deprecate/freeze test-integration-cli)
This adds a new package `integration` where `engine` integration tests
should live. Those integration tests should not depends on any `cli`
components (except from the `dockerd` daemon for now — to actually
start a daemon).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6b025a8b665f7b976bb2560488ba07f55dbf0fb6
Component: engine
2017-08-09 11:02:57 -04:00
0ec0dcde9e Remove integration tests and port them to integration-cli
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: f7e417ea5e26f11ec43dba64ee153765d2276f40
Component: engine
2015-04-30 01:35:16 +02:00
ae74d9f34f trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
Upstream-commit: 3941623fbc3fa724d61f53121513ffd87d03b61c
Component: engine
2015-04-27 13:35:08 -07:00
41061500b4 Remove engine/job from graph
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: fa2c68a89e153cfc82c5af7cbb6d7f15b06e0a8c
Component: engine
2015-04-23 23:36:29 +02: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
c8f1332dce Move CLI config processing out from under registry dir
No logic changes should be in here, just moving things around.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: bb9da6ba9294a8eab8f4dfaf7cf07c57959fe608
Component: engine
2015-04-23 10:18:38 -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
1b7f0b8878 Merge pull request #12611 from LK4D4/remove_eng_chain_pull
Remove chain of engine passing from builder to loadManifest
Upstream-commit: ccbb93e1cd38ad0a38455ad054b170f444aa9da3
Component: engine
2015-04-21 19:19:56 -04:00
43e79cc411 Remove chain of engine passing from builder to loadManifest
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a2f74aa4b449479dc3953b129c839ca90b089494
Component: engine
2015-04-21 14:55:23 -07:00
79e92cb2ff Merge pull request #12567 from brahmaroutu/integration_test6_12255
moving integration tests to graph unit tests
Upstream-commit: 7ba8c3b26ffedc869c2868c3e90ef81315af6b8f
Component: engine
2015-04-21 13:58:02 -07:00
b10206f2eb moving integration tests to graph unit tests
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 29c5596176769fc99a22b1d0a78dd5ea279fec69
Component: engine
2015-04-20 21:08:45 +00:00
47e2254d8e Make all http handlers api.server.Server methods
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: da7bca449652396dd8a4a0ff2e303d3d3c7a58a2
Component: engine
2015-04-20 09:45:31 -07:00
2e27fa9e39 Make API server datastructure
Added daemon field to it, will use it later for acces to daemon from
handlers

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: d9ed3165228b60cb89c31d0d66b99e01ab83eb3e
Component: engine
2015-04-20 08:13:39 -07:00
14bae8f05b Merge pull request #12358 from ZJU-SEL/remove_job_from_tag
remove job from tag
Upstream-commit: b1d8ae3824d2902c86d63837b8d413952b546d62
Component: engine
2015-04-19 16:02:28 -04:00
dd5f4141fe remove job from tag
Signed-off-by: Simei He <hesimei@zju.edu.cn>
Upstream-commit: 99f6309b97041bf82cc845340734dc8e47977c8a
Component: engine
2015-04-19 18:36:56 +08:00
41c63ff3d3 Merge pull request #12490 from LK4D4/carry_12396
remove job from pull and import
Upstream-commit: 055c6dbaefc61c597164aaedee4448bc32522b2e
Component: engine
2015-04-17 15:26:30 -04:00
0ff275f7b4 remove job from pull and import
Closes #12396

Signed-off-by: Simei He <hesimei@zju.edu.cn>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6e38a53f96403b4cbd38e49e6b294128ed054a20
Component: engine
2015-04-17 09:55:02 -07:00
6488f10044 Remove builtins
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: a0bf80fe0372196812a9cb295f209c08f8037601
Component: engine
2015-04-17 14:27:38 +02:00
b5835957f0 Move TestPostCreateNull to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 308a23021d65282cdf471ef0708ba5998b48c247
Component: engine
2015-04-16 13:49:46 -04: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
3cb6dbb528 Move TestContainerApiCreate to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 23fa7d41d5510131cdf7883a930087ac4fb34187
Component: engine
2015-04-16 13:49:10 -04:00
9e85fe7e11 Move TestPostCommit to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f19061ccfd526487391f7677bef7e1b38694d06a
Component: engine
2015-04-16 13:48:54 -04:00
51eea9357f Move TestGetContainersTop to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d9e4b14346c6a93bee8c24803a8538dc2d74911d
Component: engine
2015-04-16 13:48:33 -04:00
f8e57bde88 Move SaveAndThenload to integration-cli
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6f5b895bc767585be9a8e1109672fb4946e56f15
Component: engine
2015-04-16 13:40:49 -04:00
234898b4e7 Decode container configurations into typed structures.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 767df67e3149b83255db0809f6543b449a4f652e
Component: engine
2015-04-15 10:22:07 -07:00