Commit Graph

818 Commits

Author SHA1 Message Date
d02918ddb2 Format code with gofmt -s from go-1.11beta1
This should eliminate a bunch of new (go-1.11 related) validation
errors telling that the code is not formatted with `gofmt -s`.

No functional change, just whitespace (i.e.
`git show --ignore-space-change` shows nothing).

Patch generated with:

> git ls-files | grep -v ^vendor/ | grep .go$ | xargs gofmt -s -w

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9b0097a69900009ab5c2480e047952cba60462a7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ee28567c7066368207a947e02c6242db7a4adb16
Component: engine
2019-06-20 11:23:45 +02:00
31e95a598d Merge pull request #286 from thaJeztah/18.09_backport_cp_slash_fix
[18.09 backport] Fix docker cp when container source path is /
Upstream-commit: c513a4c6c2989445efb75f84b5f62440d1a7bf0c
Component: engine
2019-06-19 18:40:54 -07:00
728c223f90 Merge pull request #273 from thaJeztah/18.09_backport_entropy_cannot_be_saved
[18.09 backport] Entropy cannot be saved
Upstream-commit: 0ab832439e8ae2810e7a7ab2e2d7860bb6f45789
Component: engine
2019-06-18 10:00:05 -07:00
800f827460 Merge pull request #199 from thaJeztah/18.09_backport_fix_panic_on_empty_dockerfile
[18.09 backport] fix panic on empty dockerfile
Upstream-commit: 70399c41d321651121a4eb2775c4e7f63796426f
Component: engine
2019-06-18 09:49:05 -07:00
b0ff7b744e integration: have container.Create call compile
For reference on why this is needed:
https://github.com/docker/engine/pull/280#issuecomment-502056661

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8f4b96f19e64b96df9d8c43208cefb113715ccbf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 584c0857ab21895e62feac686448085113c6c977
Component: engine
2019-06-18 17:28:54 +01:00
9f18b94c1b add more tests
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 02f1eb89a42b4a9e91a8c80c213f7dc3193c75b9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c820334ff3e048d1207a63ba9d5b9d11e38f649d
Component: engine
2019-06-18 14:44:04 +01:00
2bf8bffc5b Add test for copying entire container rootfs
CID=$(docker create alpine)
docker cp $CID:/ out

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 6db9f1c3d6e9ad634554cacaf197a435efcf8833)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8fd0d71d7e4b03a815f2fb86b19ef2a71a1b7ce0
Component: engine
2019-06-18 14:43:49 +01:00
a3041ba7dd Test: dockerfiles with no instructions are detected
Signed-off-by: Natasha Jarus <linuxmercedes@gmail.com>
(cherry picked from commit 18c7e8b927928654a67ce5d6637e42932fc3e7df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cd084b23f7c3ca38c5d9c15ec16e119d25e5d7af
Component: engine
2019-06-18 13:44:08 +01:00
932cc247c5 Entropy cannot be saved
Remove non cryptographic randomness.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 2df693e533e904f432c59279c07b2b8cbeece4f0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 292b43b15b68cd4b64bfc7b89452dc19ddf2cf48
Component: engine
2019-06-18 13:38:50 +01:00
ac643ab134 Remove a network during task SHUTDOWN instead of REMOVE to
make sure the LB sandbox is removed when a service is updated
with a --network-rm option

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit 680d0ba4abfb00c8ac959638c72003dba0826b46)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 280b8dff7df137dd21fcf27cacf6d12ed531770a
Component: engine
2019-06-18 13:33:58 +01:00
e00a39ba2b Move serviceRunningTasksCount to integration/internal/swarm
This fix moves multiple places of serviceRunningTasksCount
to one location in integration/internal/swarm, so that
code duplication could be removed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit e485a60e2bcc59860f387c94f6afaa0130ea7040)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c087f681d40332bd7d158baf615c03f6a72274f1
Component: engine
2019-06-18 13:33:14 +01:00
e91395081e integration: Corrected service update tests logic
Tests which will re-deploy containers uses function serviceIsUpdated() to
make sure that service update really reached state UpdateStateCompleted.

Tests which will not re-deploy container uses function
serviceSpecIsUpdated to make sure that service version is increased.

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit b868ada474b5c214ed9bddb792dd36f794dc1fa6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ccc1abea092a54d99dec51345ef9303b4629572d
Component: engine
2019-06-18 13:33:06 +01:00
9d41ea2d82 integration: wait for service update to be completed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8edcd4c3cd294bf276ffbe29bc58afbb006593b8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2ae0365c99627343d001a24e171fba2aa0fea791
Component: engine
2019-06-18 13:33:02 +01:00
29d8b5118f 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>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit be151a73f0c0f362ff9775d2ff4d32329c01b8ba)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4fe4e891723569fde7703747903289883db1dec0
Component: engine
2019-06-18 13:32:59 +01:00
1b706a11a2 Merge pull request #276 from thaJeztah/18.09_backport_enable_new_integration_tests_for_win
[18.09 backport] Enable integrations API tests for Windows CI
Upstream-commit: 49a4899c79f740e5a8e19df62ea341be9d5200be
Component: engine
2019-06-17 12:26:34 -07:00
c82a61bcb3 Enable integrations API tests for Windows CI
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 2f22247cad9237d255a4b541a974705802abdad8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 69503ef832fed199e28ccfd731281a4e439a8eeb
Component: engine
2019-06-12 10:15:29 +02:00
0c1bb16a07 Skip TestInfoAPIWarnings on remote daemons
This test starts a new daemon, which will fail when testing
against a remote daemon;

    --- FAIL: TestInfoAPIWarnings (0.00s)
        info_test.go:53: failed to start daemon with arguments [-H=0.0.0.0:23756 -H=unix:///tmp/docker-integration/d5153ebcf89ef.sock] : [d5153ebcf89ef] could not find docker binary in $PATH: exec: "dockerd": executable file not found in $PATH

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 056840c2a644cc37f91392103f5c3ae05d14a695)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5e024a2fcd10585611ab1ea792d0256c6477c87c
Component: engine
2019-05-25 22:06:36 +02:00
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