Commit Graph

801 Commits

Author SHA1 Message Date
aa5b904041 TestDaemonRestartIpcMode: modernize
Move the test case from integration-cli to integration.

The test logic itself has not changed, except these
two things:

* the new test sets default-ipc-mode via command line
  rather than via daemon.json (less code);
* the new test uses current API version.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9fd765f07cc08ccc2ea991d21835bf50ece9318b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b228a498d55fcd47c741d51a510a7f5eab0794f7
Component: engine
2019-04-17 23:09:51 +02:00
51a09b5116 integration: add/use WithRestartPolicy
NOTE TestUpdateRestartPolicy is left as is as otherwise
it will decrease its readability.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f664df01d1836686c7a8a917e9da81d56c758d74)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c546aace40872169b03e18f07294d3fbfa3d452
Component: engine
2019-04-17 23:09:48 +02:00
9659d7a8ac integration/internal/container/ops: rm unused code
Since container.Create() already initializes HostConfig
to be non-nil, there is no need for this code. Remove it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 17022b3ad2d95863e5acd17ebaf943b7761623cc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ed48a92a580b7ccc5c5837c7d802f787000146eb
Component: engine
2019-04-17 23:09:45 +02:00
00e3442134 TestUpdateRestartWithAutoRemove: use WithAutoRemove
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 39eaf1ef9709d79fc50095ee2a0546bd2f565ab2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f9823799281419aae1b30d961d5c719dd6e392e2
Component: engine
2019-04-17 23:09:43 +02:00
9295462ecc Completely remove d.NewClient from testing tools
Favor `d.NewClientT` instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit e063099f918a01891db4389aaa6ba843e5d37fa9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1efe4720feb93c7f47d717001091279636f2039e
Component: engine
2019-04-17 23:08:59 +02:00
d2f16c6807 Use assert.NilError() instead of assert.Assert()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3449b12cc7eefa8ebd0de6ec8b9803c6ee823af0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 93de0314c7e44d625d791fa14d7316da6d1fc9c7
Component: engine
2019-04-17 23:08:54 +02:00
0e40cd84ba Use poll.WaitOn in authz_plugin_test.go
This fix uses poll.WaitOn to replace customerized
implementation in authz_plugin_test.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 0492b0997b2fc739a9a6fe6831145297d8149e55)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cdb40114b4b50bb86e03210186823895e4454653
Component: engine
2019-04-17 23:08:49 +02:00
a6c15caac6 Replace deprecated client.WithDialer()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8d3feccfa9dd0c0b5d866eba982c89f739b5e5b2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c1307fc901fe13e3b45be71638734bf91a7e70f
Component: engine
2019-04-17 23:08:46 +02:00
777ce45527 Integration tests: remove some duplicated code, and preserve context
This introduces `NoTasksForService` and `NoTasks` poller checks, that
can be used to check if no tasks are left in general, or for a specific
service.

Some redundant checks were also removed from some tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 56a68c15f8a093b1761e77a74d8b7acdfbcb30a2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8f6421457d3be6280236aa466e533fb32cb4509b
Component: engine
2019-04-17 23:08:41 +02:00
66a128b214 Refactor TestInspectNetwork
Clean up and refactor this test;

- make `serviceRunningTasksCount` to use a `desired-state` filter
- use subtests, and inline the `validNetworkVerbose` checks; also use
  asserts for the individual checks, so that any failure will log exactly
  what failed
- remove helper functions that are no longer needed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 60d93aab2e68b13b3f22c43add4762d3e8108227)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 046352162f1a23f10a05b59e4fac9d932bcd4f35
Component: engine
2019-04-17 23:08:39 +02:00
df3af968c9 Remove code duplication and consolidate networkIsRemoved
This fix removes code duplication and consolidates networkIsRemoved
into one place.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 28b7824caa9c8f1acc0471136a8a4fd80e51f491)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dd20556e037b262473f3f8163dfc7c21e9161c8e
Component: engine
2019-04-17 23:08:37 +02:00
f976c75276 Remove use of deprecated client.NewEnvClient()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c8ff5ecc091278520a890ce58ed891ec354bf6d9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b9102e2a6b4bb79e080e9ce9d46046532df6f152
Component: engine
2019-04-17 23:08:34 +02:00
7c76af2251 Fix some minor wording / issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 263e28a830c7c0ba573f8bb6aa37bee1c3956d22)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a234f6a71c8dcecebf5ee32c6784b47ca97872c
Component: engine
2019-04-17 23:08:32 +02:00
37d514b106 Simplify skip checks
These tests are run on a local Linux daemon only, so no need
to do a platform-check.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 69c0b7e47682a2a7a850122a9a2f711259fbb25a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb6db57acc8a63f7f85fafe4be0cfe7fa929e3a1
Component: engine
2019-04-17 23:08:29 +02:00
ee07b18c8e Only build IPCmode tests on Linux
These tests can only be run on a local Linux daemon, so there's
no need to build them on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 84224935ea78d93e21a21c0e1e0aa3e83a5c7853)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4c0a7efd46d5fb13df7214aface1f291ba356d2
Component: engine
2019-04-17 23:08:26 +02:00
b432f71813 Improve consistency in "skip"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a3948d17d330315c832112bfecfc15d5e19511b1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cdedf9ae3ef586a466bc34b9003def2a19c4b42c
Component: engine
2019-04-17 23:08:23 +02:00
f3a38b2efd Integration: use testenv.APIClient()
A client is already created in testenv.New(), so we can just
as well use that one, instead of creating a new client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0de62d9bbcb92e9b7c73ee4cdef51c2229878e05)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e438d4799d6e233fe631d332973dcac1d977fef6
Component: engine
2019-04-17 23:04:49 +02:00
b202193ebd Don't mix t.Parallel() wth environment.ProtectAll()
`testEnv` is a package-level variable, so protecting / restoring
`testEnv` in parallel will result in "concurrent map write" errors.

This patch removes `t.Parallel()` from tests that use this
functionality (through `defer setupTest(t)()`).

Note that _subtests_ can still be run in parallel, as the defer
will be called after all subtests have completed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4d88a95d6730383624570f8730aa203a56caadc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 05ecb140c4f3c4c7cbb860baa425104fa6f132ea
Component: engine
2019-04-17 21:34:30 +02:00
7f2bfe773c Test: Replace NewClient() with NewClientT()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2cb7b73a1bdbf2e7ea6da7d0c050b303c2c4f5dc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bb221587404be76f404062618e7d947f4d1bd39b
Component: engine
2019-04-17 21:34:09 +02:00
c975557150 cli: fix images filter when use multi reference filter
Signed-off-by: zhangyue <zy675793960@yeah.net>
(cherry picked from commit 5007c36d71ac86f5b47b6ba10a5ed6e841807284)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8a614d1b2494b6d2381e157a99ad2736a6038d2d
Component: engine
2019-04-17 21:32:23 +02:00
04efd9ec4a migrated ipc integration tests to integration/container
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
(cherry picked from commit febefb850d12e0ed1c2ab2a25336ece43204ba03)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6a1983ea7564697f18ce2aa1147646906abb97c4
Component: engine
2019-04-17 21:32:18 +02:00
2ee77da805 Fix some typos
Signed-off-by: Xiaoxi He <xxhe@alauda.io>
(cherry picked from commit 5c0d2a0932afb1e9c9e26326a22fdbefa1069463)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0b46144ff726f57640b85e7b24a2443f46eb9e25
Component: engine
2019-04-17 21:32:10 +02:00
bb938bc1ef Use original process spec for execs
Fixes #38865

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 7603c22c7365d7d7150597fe396e0707d6e561da)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3d3d7570714a8ab60b979eaba39309b6e8fcf75e
Component: engine
2019-03-26 12:37:59 +01:00
b9167a9818 Fix TestBuildWithSession, TestBuildSquashParent using wrong daemon during test
These tests were spinning up a new daemon, but after the daemon was spun up,
the default test-daemon was used by the client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9a3911ced83331b6efe698528a4480bd5ff3d7a6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 605bc1ffc5adc5a3968ebe7a58060d2542cc28f3
Component: engine
2019-03-06 22:11:22 +01:00
125d84fbcf Fix: plugin-tests discarding current environment
By default, exec uses the environment of the current process, however,
if `exec.Env` is not `nil`, the environment is discarded:

e73f489494/src/os/exec/exec.go (L57-L60)

> If Env is nil, the new process uses the current process's environment.

When adding a new environment variable, prepend the current environment,
to make sure it is not discarded.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b84bff7f8ad1562a7d05f21bd84179d3306f2b4b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 19e733f89f7652f58b567b5178bacc10ef2940b5
Component: engine
2019-02-20 11:27:07 +01:00
8c0e7ea89c Revert "[18.09 backport] API: fix status code on conflicting service names"
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 24f71e39980e8a4c6eabcea16e0a9efce1660bbe
Component: engine
2018-12-28 09:40:26 -08:00
6155a653aa Add test for status code on conflicting service names
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b0de11cf3018b482dfcf8c873261dc11c8fce0b0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a69626afb12eb9ec3e374aa563b561c0ba28f27f
Component: engine
2018-12-10 12:21:26 +01:00
ed2630b559 Merge pull request #110 from thaJeztah/18.09_backport_handle_invalid_json
[18.09 backport] API: properly handle invalid JSON to return a 400 status
Upstream-commit: 8f18feabeb9ef7fe670ff6f1ecbba2a6460e0267
Component: engine
2018-11-27 09:51:54 -08:00
72b50c8f3c Merge pull request #109 from thaJeztah/18.09_backport_cleanup_volume_tests
[18.09 backport] Cleanup volume integration tests
Upstream-commit: 4980e48e4b2c34288cf3f1265db6eff6713b487c
Component: engine
2018-11-14 15:41:13 -08:00
40c17e0f1b Merge pull request #103 from thaJeztah/18.09_backport_fix_double_scheme
[18.09 backport] Fix double "unix://" scheme in TestInfoAPIWarnings
Upstream-commit: 299385de7fb930e7e805faf960dc66e9cadd8ad4
Component: engine
2018-11-14 15:39:54 -08:00
3cd1faba5a API: properly handle invalid JSON to return a 400 status
The API did not treat invalid JSON payloads as a 400 error, as a result
returning a 500 error;

Before this change, an invalid JSON body would return a 500 error;

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json" \
  -d '{invalid json'
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 13
>
* upload completely sent off: 13 out of 13 bytes
< HTTP/1.1 500 Internal Server Error
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:55:20 GMT
< Content-Length: 79
<
{"message":"invalid character 'i' looking for beginning of object key string"}
```

Empty request:

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json"
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
>
< HTTP/1.1 500 Internal Server Error
< Api-Version: 1.38
< Content-Length: 18
< Content-Type: application/json
< Date: Mon, 05 Nov 2018 12:00:18 GMT
< Docker-Experimental: true
< Ostype: linux
< Server: Docker/18.06.1-ce (linux)
<
{"message":"EOF"}
```

After this change, a 400 is returned;

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json" \
  -d '{invalid json'
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 13
>
* upload completely sent off: 13 out of 13 bytes
< HTTP/1.1 400 Bad Request
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:57:15 GMT
< Content-Length: 79
<
{"message":"invalid character 'i' looking for beginning of object key string"}
```

Empty request:

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json"
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
>
< HTTP/1.1 400 Bad Request
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:59:22 GMT
< Content-Length: 49
<
{"message":"got EOF while reading request body"}
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7b488fbc82604ec23b862ec1edc5a0be9c7793d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9e06a421234f0bba8392b9a8908a94ff74f0c254
Component: engine
2018-11-08 14:01:27 +01:00
2ccb209d78 Enable volume tests on Windows
These tests don't seem to have anything Linux-specific,
so enable them on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b334198e652b503d432832ec6f4faab7707d0eb4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e8eb3ca4eef1c913563195787eb1f2527c9febf3
Component: engine
2018-11-08 14:00:20 +01:00
7f84ab28cd Integration test: use filepath.Join() to make path cross-platform
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05e18429cf50afbc40456a6f4eff1cfd6f1da707)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 673f04f0b1afdb0a1f739b9a4a8b41ea1e015ea4
Component: engine
2018-11-08 14:00:14 +01:00
0356a45a1c Some improvements to TestVolumesInspect
Some improvements in this test;

- use the volume-information that's returned by VolumeCreate as "expected"
- don't use an explict name for the volume, as it was only used to reference
  the volume for inspection
- improve the test-output on failure, so that "expected" and "actual" values
  are printed

Without this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
     	volume_test.go:108: assertion failed: false (bool) != true (true bool): Time Volume is CreatedAt not equal to current time
    FAIL

With this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
        volume_test.go:95: assertion failed: expression is false: createdAt.Truncate(time.Minute).Equal(now.Truncate(time.Minute)): CreatedAt (2018-11-01 16:15:20 +0000 UTC) not equal to creation time (2018-11-01 16:15:20.2421166 +0000 UTC m=+13.733512701)
    FAIL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8e8cac82637952d49f8df42a3164478f13978c90)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 65bf95f3df84de5901479091685715f227c333ce
Component: engine
2018-11-08 14:00:08 +01:00
36fc33af11 Enabling Windows integration tests
Signed-off-by: Salahuddin Khan <salah@docker.com>
(cherry picked from commit 4c8b1fd5a2803e393ad1296692533b7b5c727918)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 37cb9e73006acd13b9708cd594ebc25054fef666
Component: engine
2018-11-08 13:55:59 +01:00
171a95c777 Windows: Start of enabling tests under integration/
- Add windows CI entrypoint script.

Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit d3cc071bb98669545d4e3043c9bd85879292b815)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 59be98043a02f44b63b26f159461fed08292e027
Component: engine
2018-11-08 13:55:48 +01:00
26724923df Merge pull request #79 from thaJeztah/18.09_backport_bugfix_issue_37870
[18.09 backport] bugfix: wait for stdin creation before CloseIO
Upstream-commit: 6236f7b8a47fbd77895f8894306de4555d511f40
Component: engine
2018-11-06 11:27:58 -08:00
81daf7f4fb Fix double "unix://" scheme in TestInfoAPIWarnings
`d.Sock()` already returns the socket-path including the
`unix://` scheme.

Also removed `--iptables=false`, as it didn't really seem
nescessary for this test.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 14342046477b7ed87a9c5c451bb4520c7f6cabcc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c40a7d393bca990e07973024e71034b4b6fc05e5
Component: engine
2018-10-31 14:25:40 +01:00
b8f9cfd066 testing: add case for exec closeStdin
add regression case for the issue#37870

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 8e25f4ff6d89888a1bcd578f3f8f7aab89dce24d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ae6284a623bac86ac6ab718fa4a369dd8c0a3cfc
Component: engine
2018-10-23 13:20:45 +02:00
b4ba6169d9 Global Default AddressPool - Update
Addressing few review comments as part of code refactoring.
Also moved validation logic from CLI to Moby.

Signed-off-by: selansen <elango.siva@docker.com>
(cherry picked from commit 148ff00a0a800fad99de11ee3021d4c5d4869157)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9816bfcaf58a609d64d648043c10817c27dcfa36
Component: engine
2018-10-04 21:59:09 +02:00
f4f83c427c TestServiceWithDefaultAddressPoolInit: avoid panic
Saw this in moby ci:

> 00:22:07.582 === RUN   TestServiceWithDefaultAddressPoolInit
> 00:22:08.887 --- FAIL: TestServiceWithDefaultAddressPoolInit (1.30s)
> 00:22:08.887 	daemon.go:290: [d905878b35bb9] waiting for daemon to start
> 00:22:08.887 	daemon.go:322: [d905878b35bb9] daemon started
> 00:22:08.888 panic: runtime error: index out of range [recovered]
> 00:22:08.889 	panic: runtime error: index out of range
> 00:22:08.889
> 00:22:08.889 goroutine 360 [running]:
> 00:22:08.889 testing.tRunner.func1(0xc42069d770)
> 00:22:08.889 	/usr/local/go/src/testing/testing.go:742 +0x29d
> 00:22:08.890 panic(0x85d680, 0xb615f0)
> 00:22:08.890 	/usr/local/go/src/runtime/panic.go:502 +0x229
> 00:22:08.890 github.com/docker/docker/integration/network.TestServiceWithDefaultAddressPoolInit(0xc42069d770)
> 00:22:08.891 	/go/src/github.com/docker/docker/integration/network/service_test.go:348 +0xb53
> .....

Apparently `out.IPAM.Config[0]` is not there, so to avoid panic, let's
check the size of `out.IPAM.Config` first.

Fixes: f7ad95cab9c

[v2: add logging of data returned by NetworkInspect()]
[v3: use assert.Assert to fail immediately]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 69d3a8936b8d91e43290aadb9f7ac2cd2929dc61)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f43fc6650cf5a452157fe081086098c124a426fd
Component: engine
2018-09-14 15:22:43 +02:00
a4e38c5935 integration/build: add TestBuildHugeFile
Add a test case for creating a 8GB file inside a container.
Due to a bug in tar-split this was failing in Docker 18.06.

The file being created is sparse, so there's not much I/O
happening or disk space being used -- meaning the test is
fast and does not require a lot of disk space.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b3165f5b2d7c1063c2a76a7ed5c2dd18f868276b)
Upstream-commit: fc1d808c44f77e3929c4eeba7066501890aecd4e
Component: engine
2018-09-06 17:24:36 -07:00
5a73ccd4a8 builder: add prune options to the API
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8ff7847d1cf0f156b8a7cf1450aa944ef636c747)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3153708f13ceefc3e8e4d4a93778dcc9e4347f5a
Component: engine
2018-09-04 15:02:28 +00:00
7469deec1a Add warning if REST API is accessible through an insecure connection
The remote API allows full privilege escalation and is equivalent to
having root access on the host. Because of this, the API should never
be accessible through an insecure connection (TCP without TLS, or TCP
without TLS  verification).

Although a warning is already logged on startup if the daemon uses an
insecure configuration, this warning is not very visible (unless someone
decides to read the logs).

This patch attempts to make insecure configuration more visible by sending
back warnings through the API (which will be printed when using `docker info`).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 547b993e07330f3e74cba935975fce05e8661381
Component: engine
2018-08-21 22:03:24 +02:00
c9c36cf7eb Global Default Address Pool feature support
This feature allows user to specify list of subnets for global
default address pool. User can configure subnet list using
'swarm init' command. Daemon passes the information to swarmkit.
We validate the information in swarmkit, then store it in cluster
object. when IPAM init is called, we pass subnet list to IPAM driver.

Signed-off-by: selansen <elango.siva@docker.com>
Upstream-commit: f7ad95cab9cc7ba8925673a933028d53284c13f5
Component: engine
2018-08-20 15:07:08 -04:00
a055aa9d40 Migrate some ipc container test from integration-cli to integration
This fix migrates some ipc container tests from integration-cli
to integration test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 80c92c9b692b79273200b6e37f14a6d4e984ab8d
Component: engine
2018-08-01 21:51:45 +00:00
546812f824 Merge pull request #37438 from adshmh/fix-flaky-test-TestRunContainerWithBridgeNone
fix the race condition in the integration test TestRunContainerWithBridgeNone
Upstream-commit: 9149ef67be8ac945d68fafb16a1aa4ccb2f72249
Component: engine
2018-08-01 09:57:29 +02:00
82168dfb82 Revert "migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service"
This reverts commit fbaef1b0d3c5656a8aa5f0424b89c118ca277427.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c2e3657b17d8a1fcb80d39e92bdea1a478f82f34
Component: engine
2018-07-27 17:35:52 +02:00
cfcd7a95da migrated service integration tests from integration-cli/docker_cli_service_update_test.go to integration/service
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: fbaef1b0d3c5656a8aa5f0424b89c118ca277427
Component: engine
2018-07-25 14:49:02 -04:00
6f81e7d4d9 Merge pull request #37483 from thaJeztah/fix-nit-pick
Use constant for task runtime value
Upstream-commit: cc7cda1968062fc6dde28c93e85a0192d58b6d90
Component: engine
2018-07-18 17:31:44 +02:00