Commit graph

37603 commits

Author SHA1 Message Date
Sebastiaan van Stijn
7c40c0a922
integration-cli: remove unnescessary conversions (unconvert)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:57:01 +02:00
Sebastiaan van Stijn
417eac47a0
integration-cli: fix minor linting issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:57:00 +02:00
Sebastiaan van Stijn
67e4d36e46
integration-cli: remove unused functions and enable disabled tests
```
14:26:43 integration-cli/docker_cli_pull_local_test.go:64:6: U1000: func `testConcurrentPullWholeRepo` is unused (unused)
14:26:43 func testConcurrentPullWholeRepo(c *check.C) {
14:26:43      ^
14:26:43 integration-cli/docker_cli_pull_local_test.go:111:31: U1000: func `(*DockerRegistrySuite).testConcurrentPullWholeRepo` is unused (unused)
14:26:43 func (s *DockerRegistrySuite) testConcurrentPullWholeRepo(c *check.C) {
14:26:43                               ^
14:26:43 integration-cli/docker_cli_pull_local_test.go:115:38: U1000: func `(*DockerSchema1RegistrySuite).testConcurrentPullWholeRepo` is unused (unused)
14:26:43 func (s *DockerSchema1RegistrySuite) testConcurrentPullWholeRepo(c *check.C) {
14:26:43                                      ^
14:26:43 integration-cli/docker_cli_pull_local_test.go:120:6: U1000: func `testConcurrentFailingPull` is unused (unused)
14:26:43 func testConcurrentFailingPull(c *check.C) {
14:26:43      ^
14:26:43 integration-cli/docker_cli_pull_local_test.go:142:31: U1000: func `(*DockerRegistrySuite).testConcurrentFailingPull` is unused (unused)
14:26:43 func (s *DockerRegistrySuite) testConcurrentFailingPull(c *check.C) {
14:26:43                               ^
14:26:43 integration-cli/docker_cli_pull_local_test.go:146:38: U1000: func `(*DockerSchema1RegistrySuite).testConcurrentFailingPull` is unused (unused)
14:26:43 func (s *DockerSchema1RegistrySuite) testConcurrentFailingPull(c *check.C) {

14:26:43 integration-cli/docker_utils_test.go:170:6: U1000: func `inspectImage` is unused (unused)
14:26:43 func inspectImage(c *check.C, name, filter string) string {
14:26:43      ^
14:26:43 integration-cli/events_utils_test.go:196:6: U1000: func `parseEventsWithID` is unused (unused)
14:26:43 func parseEventsWithID(c *check.C, out, match, id string) {
14:26:43      ^
14:26:43 integration-cli/fixtures_linux_daemon_test.go:17:6: U1000: type `testingT` is unused (unused)
14:26:43 type testingT interface {
14:26:43      ^
14:26:43 integration-cli/fixtures_linux_daemon_test.go:19:2: U1000: func `testingT.Fatalf` is unused (unused)
14:26:43 	Fatalf(string, ...interface{})
14:26:43 	^
14:26:43 integration-cli/fixtures_linux_daemon_test.go:22:6: U1000: type `logT` is unused (unused)
14:26:43 type logT interface {
14:26:43      ^
14:26:43 integration-cli/fixtures_linux_daemon_test.go:23:2: U1000: func `logT.Logf` is unused (unused)
14:26:43 	Logf(string, ...interface{})
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:56:59 +02:00
Sebastiaan van Stijn
a0d58b2248
integration-cli: use raw strings for regexes (gosimple)
```
14:26:43 integration-cli/docker_cli_build_test.go:3430:15: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
14:26:43 	outRegexp := regexp.MustCompile("^(sha256:|)[a-z0-9]{64}\\n$")
14:26:43 	             ^
14:26:43 integration-cli/docker_cli_by_digest_test.go:26:20: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
14:26:43 	pushDigestRegex = regexp.MustCompile("[\\S]+: digest: ([\\S]+) size: [0-9]+")
14:26:43 	                  ^
14:26:43 integration-cli/docker_cli_by_digest_test.go:27:20: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
14:26:43 	digestRegex     = regexp.MustCompile("Digest: ([\\S]+)")
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:56:58 +02:00
Sebastiaan van Stijn
fdc1b22030
integration-cli: fix incorrect permissions (staticcheck)
```
13:06:14 integration-cli/docker_api_containers_test.go:1983:72: SA9002: file mode '666' evaluates to 01232; did you mean '0666'? (staticcheck)
13:06:14 	err = ioutil.WriteFile(filepath.Join(tmpDir, "bar"), []byte("hello"), 666)
13:06:14 integration-cli/fixtures_linux_daemon_test.go:64:46: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck)
13:06:14 	err = ioutil.WriteFile(dockerFile, content, 600)
13:06:14 	                                            ^
13:06:14 integration-cli/fixtures_linux_daemon_test.go:119:54: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck)
13:06:14 	err = ioutil.WriteFile(dockerfile, []byte(content), 600)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:56:57 +02:00
Sebastiaan van Stijn
b639f933e1
integration-cli: fix capitalization of variables and errors (golint)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:56:56 +02:00
Sebastiaan van Stijn
07ff4f1de8
goimports: fix imports
Format the source according to latest goimports.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:56:54 +02:00
Sebastiaan van Stijn
56e690f340
cluster/executor: remove unused containerConfig.endpoint()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:48 +02:00
Sebastiaan van Stijn
c2532d56b0
volume Create: fix incorrect file permissions (staticcheck)
```
14:01:54 volume/local/local.go:175:80: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck)
14:01:54 		if err = ioutil.WriteFile(filepath.Join(filepath.Dir(path), "opts.json"), b, 600); err != nil {
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:47 +02:00
Sebastiaan van Stijn
f6f58f3858
daemon.getEndpointInNetwork() is only used on Windows
```
13:06:14 daemon/network.go:964:6: U1000: func `getEndpointInNetwork` is unused (unused)
13:06:14 func getEndpointInNetwork(name string, n libnetwork.Network) (libnetwork.Endpoint, error) {
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:46 +02:00
Sebastiaan van Stijn
e334eeeed8
TestMoveToSubdir: use sort.Strings() (gosimple)
```
13:06:14 pkg/directory/directory_test.go:182:2: S1032: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (gosimple)
13:06:14 	sort.Sort(sort.StringSlice(results))
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:45 +02:00
Sebastiaan van Stijn
ab599b5cdc
pkg/pools/pools.go: suppress SA6002: argument should be pointer-like for now
```
13:06:14 pkg/pools/pools.go:75:13: SA6002: argument should be pointer-like to avoid allocations (staticcheck)
13:06:14 	bp.pool.Put(b)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:44 +02:00
Sebastiaan van Stijn
178af761b7
TestParseRelease: fix missing assert
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:44 +02:00
Sebastiaan van Stijn
41cfcac7fc
DriverBenchDiffApplyN: ignore empty branch (staticcheck)
suppressing the "SA9003: empty branch (staticcheck)" instead of commenting-out
or removing these lines because removing/commenting these lines causes a ripple
effect of changes, and there's still a to-do below.

```
13:06:14 daemon/graphdriver/graphtest/graphbench_unix.go:175:3: SA9003: empty branch (staticcheck)
13:06:14 		if applyDiffSize != diffSize {
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:43 +02:00
Sebastiaan van Stijn
5ded7886c3
daemon/cluster: fix unused context (staticcheck)
```
daemon/cluster/nodes.go:69:36: SA4009: argument ctx is overwritten before first use (staticcheck)
13:06:14 	return c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:42 +02:00
Sebastiaan van Stijn
8695176d11
daemon/seccomp_linux.go: fix error-capitalization (golint)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:55:40 +02:00
Michael Crosby
92cc603036
Merge pull request #39932 from thaJeztah/remove_redundant_dockerfile
Jenkinsfile: remove redundant -f Dockerfile
2019-09-16 11:44:49 -04:00
Sebastiaan van Stijn
e894aae2a6
Merge pull request #39715 from olljanat/getorplan-unit-test
Unit test for getOrphan
2019-09-16 13:53:27 +02:00
Sebastiaan van Stijn
2e7d48f2db
Merge pull request #39688 from Snorch/skip-windows-specific-isolation-requirements-on-non-windows
integration-cli/requirements: Skip windows specific isolation require…
2019-09-16 11:29:24 +02:00
Akihiro Suda
4b0371fb36
Merge pull request #39936 from elboulangero/fix-profiles-json-file-permissions
profiles: Fix file permissions on json files
2019-09-16 15:47:05 +09:00
Arnaud Rebillout
667c87ef4f profiles: Fix file permissions on json files
json files should not be executable I think.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2019-09-16 11:15:37 +07:00
Tibor Vass
984ed95ed7
Merge pull request #39789 from tiborvass/andrewhsu-jenkinsfile
Jenkinsfile: reduce CI time by disabling windows RS1
2019-09-13 17:00:48 -07:00
Sebastiaan van Stijn
64b3d12686
Jenkinsfile: remove redundant -f Dockerfile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-14 00:54:52 +02:00
Andrew Hsu
e653943e8b run integration-cli stages on s390x and ppc64le if not a PR check
Essentially, run on merge to target branch which may or may not be
master branch. Could be 19.03 branch, for example.

See: https://jenkins.io/doc/book/pipeline/syntax/

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-09-12 23:53:30 +00:00
Andrew Hsu
039eb05ac8 skip win-RS1 on PRs unless the checkbox is checked
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-09-12 23:53:30 +00:00
Brian Goff
ad718029b7
Merge pull request #39794 from tao12345666333/cleanup-set-dead-func
cleanup: remove SetDead function
2019-09-12 15:36:08 -07:00
Tibor Vass
700722fecc
Merge pull request #39736 from tiborvass/remove-warning-on-v2schema1-pull
distribution: modify warning logic when pulling v2 schema1 manifests
2019-09-12 15:15:33 -07:00
Tibor Vass
1ea16adf1e
Merge pull request #39817 from thaJeztah/refactor_TestDispatch
TestDispatch: refactor to use subtests again, and fix linting (structcheck)
2019-09-12 13:04:35 -07:00
Brian Goff
0c099fa91e
Merge pull request #39860 from stbenjam/cmd-race
archive: fix race condition in cmdStream
2019-09-12 11:52:56 -07:00
Tibor Vass
647dfe99a5 distribution: modify warning logic when pulling v2 schema1 manifests
The warning on pull was incorrectly asking to contact registry admins.
It is kept on push however.

Pulling manifest lists with v2 schema1 manifests will not be supported thus
there is a warning for those, but wording changed to suggest repository author
to upgrade.

Finally, a milder warning on regular pull is kept ONLY for DockerHub users
in order to incite moving away from schema1.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-09-12 18:52:49 +00:00
Michael Crosby
fe33a4e019
Merge pull request #39889 from cpuguy83/dont_eat_signals
Fix more signal handling issues in tests.
2019-09-12 14:51:08 -04:00
Michael Crosby
9f08135e02
Merge pull request #39844 from thaJeztah/fix_test_bashisms
Fix some bashisms/non-standard comparisons in integration tests
2019-09-12 14:49:56 -04:00
Brian Goff
4b55f3cf8b
Merge pull request #39854 from thaJeztah/hack_windows_explicit_exit
hack/ci/windows.ps1: explicitly set exit code to result of tests
2019-09-12 11:34:44 -07:00
Brian Goff
15d3310f72
Merge pull request #39877 from thaJeztah/ci_windows_storageopt
hack/ci/windows.ps1: add support for DOCKER_STORAGE_OPTS
2019-09-12 11:13:03 -07:00
Tibor Vass
31a4683fad
Merge pull request #39910 from thaJeztah/skip_TestAPIImagesSaveAndLoad_on_RS1
integration-cli: Skip TestAPIImagesSaveAndLoad on RS3 and older
2019-09-12 11:08:39 -07:00
Tibor Vass
f737ea876a
Merge pull request #39915 from thaJeztah/update_waitAndAssert_comments
integration-cli: update comments referencing waitAndAssert()
2019-09-12 10:40:12 -07:00
Kirill Kolyshkin
7bcffeef6e
Merge pull request #39901 from thaJeztah/remove_docker_cli_autogen
hack/make: remove autogen resources for Docker CLI
2019-09-12 20:21:51 +03:00
Brian Goff
921b2696b8
Merge pull request #39904 from yedamao/start-metrics-server
DaemonCli: Move check into startMetricsServer
2019-09-12 09:51:03 -07:00
Pavel Tikhomirov
b469933b06 integration-cli/requirements: Skip windows specific isolation requirements on non-windows
After the commit faaffd5d6d ("Windows:Disable 2 restart test when
Hyper-V") some tests became skipped on linux:

SKIP: docker_cli_restart_test.go:167: DockerSuite.TestRestartContainerSuccess (unmatched requirement IsolationIsProcess)
SKIP: docker_cli_restart_test.go:240: DockerSuite.TestRestartPolicyAfterRestart (unmatched requirement IsolationIsProcess)

But AFAIU it is highly unlikely that we actually meant to skip them on linux.

https://github.com/moby/moby/issues/39625

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
2019-09-12 15:14:23 +03:00
Sebastiaan van Stijn
65d58afb49
Merge pull request #39853 from tao12345666333/testcase-TestRunInteractiveWithRestartPolicy
TestRunInteractiveWithRestartPolicy: use `icmd.RunCmd` instead `icmd.StartCmd`
2019-09-12 11:39:31 +02:00
Sebastiaan van Stijn
9842431ee0
Merge pull request #39862 from vikramhh/39748_review_comments
Implement code review comments in 39748
2019-09-12 10:31:04 +02:00
Sebastiaan van Stijn
93ed57f460
Merge pull request #39913 from jmartin84/unique-names-plugin-service-test
Use unique names in integration/service/plugin_test.go
2019-09-12 09:40:54 +02:00
HuanHuan Ye
88c554f950 DaemonCli: Move check into startMetricsServer
Fix TODO: move into startMetricsServer()
Fix errors.Wrap return nil when passed err is nil

Co-Authored-By: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>
Signed-off-by: HuanHuan Ye <logindaveye@gmail.com>
2019-09-12 15:18:05 +08:00
Sebastiaan van Stijn
a44d90cdd4
integration-cli: update comments referencing waitAndAssert()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-12 08:27:03 +02:00
Tibor Vass
2900a919f4
Merge pull request #39879 from thaJeztah/fix_go_version_check_again
hack/ci/windows.ps1: fix Go version check (due to trailing .0)
2019-09-11 17:34:45 -07:00
Justen Martin
548623b758 Use unique names in integration/service/plugin_test.go
Signed-off-by: Justen Martin <jmart@the-coder.com>
2019-09-11 19:09:54 -05:00
Sebastiaan van Stijn
32f1c65162
TestBuildSquashParent: fix non-standard comparisson
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-12 00:53:59 +02:00
Sebastiaan van Stijn
dbde4786e4
integration-cli: fix some bashism's in Dockerfiles
`TestBuildBuildTimeArgEnv` and `TestBuildBuildTimeArgEmptyValVariants` were
using non-standard comparisons.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-12 00:53:57 +02:00
Tibor Vass
234b951483
Merge pull request #39724 from thaJeztah/integration_junit
Jenkinsfile: create junit.xml for integration tests
2019-09-11 15:04:08 -07:00
Sebastiaan van Stijn
d723643dc3
Jenkinsfile: add TESTDEBUG
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-11 22:33:03 +02:00