Commit Graph

40170 Commits

Author SHA1 Message Date
bc28daf367 Add more content trust tests
Importing from moby's DockerTrustSuite tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 8b00c5cfd8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:20:40 -07:00
a20423b7f7 Add a build unit test for symlinked context
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 00b803b2d8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:20:29 -07:00
8723ba6cc0 Remove unused powershell function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 10baa756b2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:19:06 -07:00
c270672ced Fixes some unit tests to be able to run them on windows
Some of them are skipped for now (because the feature is not supported
or needs more work), some of them are fixed.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 0cf2e6353a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:18:59 -07:00
0d45d8f964 Add appveyor setup to build and unit test
Adds a `make.ps1` powershell script to make it easy to compile and test.

```
.\scripts\make.ps1 -Binary
INFO: make.ps1 starting at 03/01/2018 14:37:28
INFO: Building...

 ________   ____  __.
 \_____  \ |    |/ _|
 /   |   \|      <
 /    |    \    |  \
 \_______  /____|__ \
         \/        \/

INFO: make.ps1 ended at 03/01/2018 14:37:30

.\scripts\make.ps1 -TestUnit
```

The next step is to run e2e tests on windows too.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit facb22573d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:18:52 -07:00
311944ec04 Small content trust enhancement
- `replaceDockerfileForContentTrust` is only used when content trust is
  enabled, so remove the boolean.
- rename `isContentTrustEnabled` to `contentTrustEnabled`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 63ebcae382)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:14:17 -07:00
ad89cb6a38 Only read trust setting from options
Rename IsTrusted to ContentTrustEnabled

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit feae0e9756)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:12:02 -07:00
aba0bb77e1 Refactor content_trust cli/flags handling
Remove the global variable used. Allows easier unit testing.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 6e21829af4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:07:03 -07:00
a20c69243b Cleanup config load error handling
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 789acb526c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:01:36 -07:00
bcb040440f Don't set a default filename for ConfigFile
With a default filename tests will leave a file in the working directory
that is never cleaned up.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 7c8b5708eb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 15:01:20 -07:00
2cc21bf56f Use new APIClient interface
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit cff874122c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:55:17 -07:00
a218857a9a Convert assert.Check(t, is.Error()) to assert.Error
git grep -l -P '^\s+assert\.Check\(t, is\.Error\(' | \
    xargs perl -pi -e 's/^(\s+assert\.)Check\(t, is\.Error\((.*)\)$/\1Error(t, \2/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit e15b208e96)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:48 -07:00
a723f7351d manual clean of asserts
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit f21276575f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:41 -07:00
df9ed934e3 Convert assert.Check with
git grep -l -P '^\s+assert\.Check\(t, ' | \
    xargs perl -pi -e 's/^(\s+assert)\.Check(\(t, (?!is).*(\.Execute\(|\.Set\(|\.Write\(|\.Close\(|\.Untar\(|\.WriteFile\(|Validate\().*\)$)/\1.NilError\2/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 078cbc9c4b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:34 -07:00
f7124ab5e4 Convert to assert.NilError
Using:

  git grep -l '^\s\+assert\.Check(t, err)$' | \
    xargs sed -i -e 's/^\(\s\+assert\)\.Check(t, err)$/\1.NilError(t, err)/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit baf65a5502)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:48:09 -07:00
9550f71467 dont prompt for github creds in unit test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 0f11a310fd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:45:49 -07:00
1f1816b098 Remove testutil
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 681c921528)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:40:48 -07:00
7c2863a6e0 Post migration fixes
Fix tests that failed when using cmp.Compare()
internal/test/testutil/assert
InDelta
Fix DeepEqual with kube metav1.Time
Convert some ErrorContains to assert

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 5155cda716)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:33:18 -07:00
fb9700fdbd Automated migration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 39c2ca57c1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 14:29:47 -07:00
70083e56be Replace testify vendor with updated gotestyourself
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 5ef8835f23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 13:54:23 -07:00
659ea5343c Update some assertions.
and fix some tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 93615dd967)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 13:54:15 -07:00
49dc9b064e Update gotestyourself dependency
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 98ba439f67)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 12:12:52 -07:00
9f1c3a6814 Migrate DockerTrustSuite to docker/cli e2e tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 5433ceb12ead305d8c85e8e27c4b4d842ef88ae0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 11:59:36 -07:00
83bc7fbbe0 Revert "update integration-cli tests for stderr output"
This reverts commit d5f8753b88.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 11:51:53 -07:00
fbe9d5d378 Revert "Blacklist tests, will be rewritten later on"
This reverts commit a720337d2e.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-10 11:51:37 -07:00
0520e24302 Merge pull request #473 from seemethere/vbump
[18.03] bump version to 18.03.0-ce
v18.03.0-ce
2018-03-21 15:59:46 -07:00
f178926203 Merge pull request #474 from seemethere/bump_change
[18.03] Bump date for 18.03.0-ce GA
2018-03-21 15:59:23 -07:00
e4b87d5a7d Bump date for 18.03.0-ce GA
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-03-21 18:00:38 +00:00
95930e8794 bump version to 18.03.0-ce
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-03-21 17:59:46 +00:00
fbedb97a27 Merge pull request #464 from jose-bigio/18.03_versionBump
[18.03] Version bump for 18.03-ce-rc4
v18.03.0-ce-rc4
2018-03-15 00:28:45 -07:00
1adc2983f8 Merge pull request #465 from andrewhsu/cl
[18.03] changelog for docker-ce 18.03.0 rc4
2018-03-15 00:28:11 -07:00
6bca1f316f changelog for docker-ce 18.03.0 rc4
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-03-15 07:27:47 +00:00
78455c2b2f Merge pull request #469 from andrewhsu/hns
[18.03] Update libnetwork to fix stale HNS endpoints on Windows
2018-03-15 00:21:43 -07:00
3b7099798e Update libnetwork to fix stale HNS endpoints on Windows
Update libnetwork to 1b91bc94094ecfdae41daa465cc0c8df37dfb3dd to bring in a fix
for stale HNS endpoints on Windows:

When Windows Server 2016 is restarted with the Docker service running, it is
possible for endpoints to be deleted from the libnetwork store without being
deleted from HNS. This does not occur if the Docker service is stopped cleanly
first, or forcibly terminated (since the endpoints still exist in both). This
change works around the issue by removing any stale HNS endpoints for a network
when creating it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fb364f07468e94226250a1e77579ee6117c64be2)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-03-15 04:12:34 +00:00
ef0da452ea Merge pull request #466 from thaJeztah/18.03-fix-duplicate-ip-issues
[18.03] Update libnetwork with fixes for duplicate IP addresses
2018-03-14 20:30:56 -07:00
f91125ff08 Update libnetwork with fixes for duplicate IP addresses
This updates libnetwork to 8892d7537c67232591f1f3af60587e3e77e61d41 to bring in
IPAM fixes for duplicate IP addresses.

- IPAM tests (libnetwork PR 2104) (no changes in vendored files)
- Fix for Duplicate IP issues  (libnetwork PR 2105)

Also bump golang/x/sync to match libnetwork (no code-changes, other
than the README being updated)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 55e0fe24db68b16edccb2fa49c3b1b9d3a9ce58c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-14 23:05:03 +01:00
1dd3bdc5e9 Merge pull request #459 from thaJeztah/18.03-backport-ipc-ro
[18.03] backport daemon/setMounts(): do not make /dev/shm ro
2018-03-14 12:27:12 -07:00
a3fc95aed5 Merge pull request #463 from thaJeztah/18.03-ingress-fix
[18.03] Fix automatic removal of ingress sandbox when last service leaves
2018-03-14 12:26:22 -07:00
7d9137fefc Merge pull request #461 from vdemeester/trust-updates
[18.03] move trust out of experimental
2018-03-14 10:23:54 -07:00
70cb53f0ba Merge pull request #460 from seemethere/fix_ppc64le_tests
[18.03] skip ppc64le oom tests for now
2018-03-14 10:22:01 -07:00
9cc70ae1b0 Version bump for 18.03-ce-rc4
Signed-off-by: jose-bigio <jose.bigio@docker.com>
2018-03-14 09:25:15 -07:00
30726dd76a Update vendoring for libnetwork PR #2097
This PR prevents automatic removal of the load balancing sandbox
endpoint when the endpoint is the last one in the network but
the network is marked as ingress.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
(cherry picked from commit bebad150c9c3bc6eb63758c10ef24b9298ecf6e2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-14 12:12:40 +01:00
0825e477d8 Delete the load balancer endpoint in Ingress nets
Ingress networks will no longer automatically remove their
load-balancing endpoint (and sandbox) automatically when the network is
otherwise upopulated.   This is to prevent automatic removal of the
ingress networks when all the containers leave them.  Therefore
explicit removal of an ingress network also requires explicit removal
of its load-balancing endpoint.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
(cherry picked from commit 3da4ebf355d3494d1403b2878a1ae6958b2724e9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-14 12:12:32 +01:00
735514a077 Add test for ingress removal on service removal
The commit https://github.com/moby/moby/pull/35422 had the result of
accidentally causing the removal of the ingress network when the
last member of a service left the network.  This did not appear
in swarm instances because the swarm manager would still maintain
and return cluster state about the network even though it had
removed its sandbox and endpoint.  This test verifies that after a
service gets added and removed that the ingress sandbox remains
in a functional state.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
(cherry picked from commit 805b6a7f749a6c7cbb237e21ee7260d536621808)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-14 12:12:25 +01:00
093b46e361 Bash: update trust completions
The `docker trust` commands were moved out of experimental,
and the `docker trust view` command was changed to
`docker trust inspect --pretty`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2a6808db87)
2018-03-14 09:15:23 +01:00
518a7181ad update doc
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 09ec6d4ad9)
2018-03-14 09:14:58 +01:00
48712f36a6 Move Docker Trust out of experimental
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
(cherry picked from commit ac35e851e8)
2018-03-14 09:14:31 +01:00
3d69121433 Fix comment and misc code issues
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
(cherry picked from commit 8c3d0b93d6)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-14 09:11:25 +01:00
2d81349010 Refactor trust view command into a --pretty flag on trust inspect
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
(cherry picked from commit c5554f811b)
2018-03-14 08:59:32 +01:00
7946f15b56 [integration] skip ppc64le oom tests for now
These tests were enabled by changing a config option on the ci
machines, instead of from a patch, so let me disable them
for now on ppc64le and open up another patch to enable them, where I can find
out what the issues are with them.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
(cherry picked from commit 620ddc78a1437feaa42f40853ef586d268991620)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-03-13 17:53:09 +00:00