Commit graph

5364 commits

Author SHA1 Message Date
Akihiro Suda
8b8c01dd87
Merge pull request #40074 from yedamao/fix-integration-cli
integration-cli: Fix `SA1019: httputil.ClientConn is deprecated`
2019-12-19 03:30:34 +09:00
Sebastiaan van Stijn
cbd37fbc9a
integration-cli: re-enable TestRunAttachFailedNoLeak on RS3
This test was temporarily disabled (see moby/moby#35023) because of a bug in
Windows RS3 and RS4 causing duplicate port mappings to not be detected, and
not causing an error.

This bug was fixed as MSFT:14083260 on 10/31/2017, and backported to RS3 in
November/December 2017.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-12 21:10:09 +01:00
Sebastiaan van Stijn
580d3677c8
integration-cli: normalize comment formatting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-11-27 15:36:45 +01:00
vikrambirsingh
c530c9cbb0 TestRunAttachFailedNoLeak: Compare lowercase
Fixed failures in TestRunAttachFailedNoLeak caused by case mismatch

Signed-off-by: vikrambirsingh <vikrambir.singh@docker.com>
2019-11-25 17:45:12 +00:00
Brian Goff
8840071c26
Merge pull request #40135 from thaJeztah/nitfix_galore
pkg/system: make OSVersion an alias for hcsshim OSVersion
2019-11-24 07:36:05 -08:00
Brian Goff
9e7d5ac5ea
Merge pull request #40111 from thaJeztah/TestSwarmNetworkCreateDup_subtests
integration-cli: use subtests for TestSwarmNetworkCreateDup
2019-10-28 10:51:30 -07:00
Sebastiaan van Stijn
0945a8807d
integration-cli: goimports
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-25 00:21:32 +02:00
Tibor Vass
1bd184a4c2
Merge pull request #39100 from thaJeztah/use_hcsshim_constants
Use Microsoft/hcsshim constants and deprecate pkg/system.GetOsVersion()
2019-10-24 13:58:32 -07:00
Brian Goff
352d840819
Merge pull request #40115 from thaJeztah/integration_cli_denoise
integration-cli: make some tests less noisy and easier debuggable
2019-10-24 13:36:20 -07:00
Tibor Vass
2cf86a03a9
Merge pull request #40112 from thaJeztah/cut_the_noise
integration-cli: don't log "Creating new daemon" logs, and print correct line numbers
2019-10-24 11:24:24 -07:00
HuanHuan Ye
203ba72fc5 integration-cli: Fix SA1019: httputil.ClientConn is deprecated
Rewrite sockRequestHijack to requestHijack which use writable
Transport's Response.Body to replace deprecated hijacked httputil.ClientConn.
```
// As of Go 1.12, the Body will also implement io.Writer
// on a successful "101 Switching Protocols" response,
// as used by WebSockets and HTTP/2's "h2c" mode.
Body io.ReadCloser
```.

TestPostContainersAttach and TestExecResizeImmediatelyAfterExecStart
replace all sockRequestHijack to requestHijack.

Signed-off-by: HuanHuan Ye <logindaveye@gmail.com>
2019-10-22 10:55:29 +08:00
Sebastiaan van Stijn
6b91ceff74
Use hcsshim osversion package for Windows versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-22 02:53:00 +02:00
Sebastiaan van Stijn
248c136f98
Merge pull request #40117 from andrewhsu/x
Windows: disable flaky test TestStartReturnCorrectExitCode
2019-10-22 02:28:24 +02:00
Sebastiaan van Stijn
3ddb4100a0
integration-cli: remove redundant logs from cp utils
Now that we marked these utilities as helpers, it should be
possible to find which test-case failed (if any), and we
can skip logging in the "happy path".

This makes these tests less noisy, which makes it easier
to find actually important information in the output:

     --- PASS: TestDockerSuite/TestCpFromCaseC (0.96s)
         docker_cli_cp_utils_test.go:244: checking that file "/tmp/test-cp-from-case-c450122079/file2" contains "file2\n"
         docker_cli_cp_utils_test.go:192: running `docker cp  962b1f3311e742b0842e13b2ad350214cea25883999fd26e87e8c9ddf40d5eb4:/root/file1 /tmp/test-cp-from-case-c450122079/file2`
         docker_cli_cp_utils_test.go:244: checking that file "/tmp/test-cp-from-case-c450122079/file2" contains "file1\n"

Some of these tests should probably be rewritten to use subtests,
but that's something for a follow-up.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-22 00:14:56 +02:00
Sebastiaan van Stijn
267a0294a7
integration-cli: cleanup: mark helpers as helpers, use assertion
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-22 00:14:54 +02:00
Sebastiaan van Stijn
ab9c726fc4
integration-cli: TestContainersAPICreateMountsValidation: use subtests
Before:

     --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation (0.52s)
         docker_api_containers_test.go:1927: case 0
         docker_api_containers_test.go:1927: case 1
         docker_api_containers_test.go:1927: case 2
         docker_api_containers_test.go:1927: case 3
         docker_api_containers_test.go:1927: case 4
         docker_api_containers_test.go:1927: case 5
         docker_api_containers_test.go:1927: case 6
         docker_api_containers_test.go:1927: case 7
         docker_api_containers_test.go:1927: case 8
         docker_api_containers_test.go:1927: case 9
         docker_api_containers_test.go:1927: case 10
         docker_api_containers_test.go:1927: case 11
         docker_api_containers_test.go:1927: case 12
         docker_api_containers_test.go:1927: case 13
         docker_api_containers_test.go:1927: case 14
         docker_api_containers_test.go:1927: case 15

After:

    --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation (1.13s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_0 (0.01s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_1 (0.00s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_2 (0.00s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_3 (0.00s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_4 (0.00s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_5 (0.11s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_6 (0.12s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_7 (0.13s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_8 (0.00s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_9 (0.06s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_10 (0.08s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_11 (0.10s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_12 (0.18s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_13 (0.12s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_14 (0.14s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsValidation/case_15 (0.00s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-22 00:14:52 +02:00
Sebastiaan van Stijn
9ca5ffd5f7
integration-cli: TestContainersAPICreateMountsCreate: use subtests
Before:

    --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate (24.21s)
         docker_api_containers_test.go:2100: case 0 - config: {volume  /foo false  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 1 - config: {volume  /foo/ false  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 2 - config: {volume test1 /foo false  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 3 - config: {volume test2 /foo true  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 4 - config: {volume test3 /foo false  <nil> 0xc000876640 <nil>}
         docker_api_containers_test.go:2100: case 5 - config: {bind /tmp/test-mounts-api-1770842294 /foo false  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 6 - config: {bind /tmp/test-mounts-api-1770842294 /foo true  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 7 - config: {bind /tmp/test-mounts-api-3832384157 /foo false  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 8 - config: {bind /tmp/test-mounts-api-3832384157 /foo true  <nil> <nil> <nil>}
         docker_api_containers_test.go:2100: case 9 - config: {bind /tmp/test-mounts-api-3832384157 /foo true  0xc000876aa0 <nil> <nil>}
         docker_api_containers_test.go:2100: case 10 - config: {volume  /foo false  <nil> 0xc000876ac0 <nil>}
         docker_api_containers_test.go:2100: case 11 - config: {volume  /foo/ false  <nil> 0xc000876ae0 <nil>}
         docker_api_containers_test.go:2100: case 12 - config: {volume test4 /foo false  <nil> 0xc000876b00 <nil>}
         docker_api_containers_test.go:2100: case 13 - config: {volume test5 /foo true  <nil> 0xc000876b20 <nil>}

After:

    --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate (63.59s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/0_config:_{volume__/foo_false__<nil>_<nil>_<nil>} (2.98s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/1_config:_{volume__/foo/_false__<nil>_<nil>_<nil>} (2.11s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/2_config:_{volume_test1_/foo_false__<nil>_<nil>_<nil>} (2.26s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/3_config:_{volume_test2_/foo_true__<nil>_<nil>_<nil>} (7.78s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/4_config:_{volume_test3_/foo_false__<nil>_0xc00000ecc0_<nil>} (25.19s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/5_config:_{bind_/tmp/test-mounts-api-1123034866_/foo_false__<nil>_<nil>_<nil>} (2.21s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/6_config:_{bind_/tmp/test-mounts-api-1123034866_/foo_true__<nil>_<nil>_<nil>} (2.21s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/7_config:_{bind_/tmp/test-mounts-api-3533158313_/foo_false__<nil>_<nil>_<nil>} (2.16s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/8_config:_{bind_/tmp/test-mounts-api-3533158313_/foo_true__<nil>_<nil>_<nil>} (2.18s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/9_config:_{bind_/tmp/test-mounts-api-3533158313_/foo_true__0xc00000f760_<nil>_<nil>} (2.18s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/10_config:_{volume__/foo_false__<nil>_0xc00000f780_<nil>} (2.25s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/11_config:_{volume__/foo/_false__<nil>_0xc00000f7e0_<nil>} (2.37s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/12_config:_{volume_test4_/foo_false__<nil>_0xc00000f800_<nil>} (2.28s)
        --- PASS: TestDockerSuite/TestContainersAPICreateMountsCreate/13_config:_{volume_test5_/foo_true__<nil>_0xc00000f820_<nil>} (2.44s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-22 00:14:50 +02:00
Sebastiaan van Stijn
69c4a4f4a2
integration-cli: make TestServiceLogs less noisy
Before:

    make TEST_FILTER=TestServiceLogs test-integration
    ...
    --- PASS: TestDockerSwarmSuite/TestServiceLogs (14.63s)
             docker_cli_service_logs_test.go:49: log for "TestServiceLogs1": "TestServiceLogs1.1.rjyqj1v08llu@625d614f901a    | hello1\n"
             docker_cli_service_logs_test.go:49: log for "TestServiceLogs2": "TestServiceLogs2.1.fyaljkh9tmp3@625d614f901a    | hello2\n"

After:

    make TEST_FILTER=TestServiceLogs test-integration
    ...
    --- PASS: TestDockerSwarmSuite/TestServiceLogs (14.63s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-22 00:14:48 +02:00
Sebastiaan van Stijn
ec4a34ae2f
integration-cli: migrate some "info" tests to integration
- Updated TestInfoSecurityOptions to not rely on CLI output. Note that this
  test should be migrated to the integration suite, but that suite does not yet
  have checks for "Seccomp" and "AppArmor"
- TestInfoAPIWarnings: don't start with busybox because we're not running containers in this test
- Migrate TestInfoDebug to integration suite
- Migrate TestInsecureRegistries to integration suite (renamed to TestInfoInsecureRegistries)
- Migrate TestRegistryMirrors to integration suite (renamed to TestInfoRegistryMirrors)
- Migrate TestInfoDiscoveryBackend to integration suite
- Migrate TestInfoDiscoveryInvalidAdvertise to integration suite
- Migrate TestInfoDiscoveryAdvertiseInterfaceName to integration suite
- Remove TestInfoFormat, which is testing the CLI functionality, and there is an
  existing test in docker/cli (TestFormatInfo) covering this

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-22 00:11:52 +02:00
Andrew Hsu
1be272ef76 Windows: disable flaky test TestStartReturnCorrectExitCode
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-10-21 17:00:14 +00:00
Sebastiaan van Stijn
18a97ee981
integration-cli: use subtests for TestSwarmNetworkCreateDup
This makes the test less noisy, and won't print the `failed: Error ...` messages,
which were confusing.

Also, running as a subtest allows tracking failures individually through the
junit.xml files.

Before:

    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateDup
        --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateDup (3.00s)
            daemon.go:26: Creating a new daemon at: "/go/src/github.com/docker/docker/bundles/test-integration/TestDockerSwarmSuite/TestSwarmNetworkCreateDup"
            docker_cli_swarm_test.go:1527: Creating a network named "network-test-0" with "bridge", then "bridge"
            docker_cli_swarm_test.go:1534: As expected, the attempt to network "network-test-0" with "bridge" failed: Error response from daemon: network with name network-test-0 already exists
            docker_cli_swarm_test.go:1527: Creating a network named "network-test-0" with "bridge", then "overlay"
            docker_cli_swarm_test.go:1534: As expected, the attempt to network "network-test-0" with "overlay" failed: Error response from daemon: network with name network-test-0 already exists
            docker_cli_swarm_test.go:1527: Creating a network named "network-test-1" with "overlay", then "bridge"
            docker_cli_swarm_test.go:1534: As expected, the attempt to network "network-test-1" with "bridge" failed: Error response from daemon: network with name network-test-1 already exists
            docker_cli_swarm_test.go:1527: Creating a network named "network-test-1" with "overlay", then "overlay"
            docker_cli_swarm_test.go:1534: As expected, the attempt to network "network-test-1" with "overlay" failed: Error response from daemon: network with name network-test-1 already exists

After:

    === RUN   TestDockerSwarmSuite
    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateDup
    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_bridge_then_bridge
    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_bridge_then_overlay
    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_overlay_then_bridge
    === RUN   TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_overlay_then_overlay
    --- PASS: TestDockerSwarmSuite (8.12s)
        --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateDup (8.12s)
            daemon.go:26: Creating a new daemon at: "/go/src/github.com/docker/docker/bundles/test-integration/TestDockerSwarmSuite/TestSwarmNetworkCreateDup"
            --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_bridge_then_bridge (0.52s)
            --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_bridge_then_overlay (0.31s)
            --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_overlay_then_bridge (0.17s)
            --- PASS: TestDockerSwarmSuite/TestSwarmNetworkCreateDup/driver_overlay_then_overlay (0.12s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-21 14:06:35 +02:00
Sebastiaan van Stijn
060e55d7dd
integration-cli: mark some test-helpers as helpers
Before:

    daemon.go:26: Creating a new daemon at: "/go/src/github.com/docker/docker/bundles/test-integration/TestDockerSwarmSuite/TestSwarmNetworkCreateDup"

After:

    docker_cli_swarm_test.go:1522: Creating a new daemon at: "/go/src/github.com/docker/docker/bundles/test-integration/TestDockerSwarmSuite/TestSwarmNetworkCreateDup"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-21 12:40:22 +02:00
Sebastiaan van Stijn
23b6b5a9ae
integration-cli: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:15 +02:00
Brian Goff
28b645755a
Merge pull request #40062 from thaJeztah/testutil_improvements
Various testutil improvements
2019-10-11 15:37:48 -07:00
Akihiro Suda
97c084032a
Merge pull request #40053 from thaJeztah/harden_testdaemonevents
integration-cli: rely less on CLI output format
2019-10-11 18:20:45 +09:00
Sebastiaan van Stijn
22662cac57
testutil/daemon: wrap errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-11 00:38:00 +02:00
Sebastiaan van Stijn
8a3e8ac017
TestDaemonEvents: use is.Contains() for easier debugging
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-10 00:13:24 +02:00
Tibor Vass
0e0ab58a96
integration-cli: in TestDaemonEvents* use ioutil.WriteFile
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-10-10 00:13:22 +02:00
Sebastiaan van Stijn
24a419221d
integration-cli: TestDaemonEvents*: don't rely on CLI output format
Running these tests with a different version of the CLI caused
some failures because the tests relied on the CLI's output format.

Although these tests should be rewritten to use the API directly,
in the meantime this makes them slightly more reliable.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-10 00:13:03 +02:00
Sebastiaan van Stijn
6afe0f38f6
integration-cli: make testRequires() a Helper
Make this utility a helper, so that the "skip" message is printing
the location of the test, instead of the location of the helper,
which is what it's printing now:

    requirement.go:26: unmatched requirement bridgeNfIptables

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-09 21:44:22 +02:00
Tibor Vass
dba8da8158
Merge pull request #40057 from andrewhsu/truetop
integration-cli: TestDockerNetworkConnectLinkLocalIP return on failure
2019-10-07 17:51:28 -07:00
Andrew Hsu
318e279fd8 integration-cli: TestDockerNetworkConnectLinkLocalIP return on failure
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-10-07 22:27:24 +00:00
Andrew Hsu
7450f89f6c integration-cli: TestUserDefinedNetworkConnectDisconnectAlias return on failure
Have the test return immediately if the test does not pass instead of
stuck in `top`.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-10-07 22:26:45 +00:00
Sebastiaan van Stijn
d5f07220fc
integration-cli: DockerSwarmSuite: show output on failures
Unfortunately quite some of these tests do output-matching, which
may be CLI dependent; this patch prints the output string, to help
debugging failures that may be related to the output having changed
between CLI versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-07 21:28:49 +02:00
Sebastiaan van Stijn
97aa82d2c7
integration-cli: prevent out of range in TestEventsContainerEvents
Prevents the test from panicking;

```
--- FAIL: TestDockerSuite/TestEventsContainerEvents (1.19s)
    suite.go:65: test suite panicked: runtime error: slice bounds out of range [:5] with capacity 4
        goroutine 3978 [running]:
        runtime/debug.Stack(0xc0026e3908, 0x1ad9bc0, 0xc0008100c0)
        	/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
        github.com/docker/docker/internal/test/suite.failOnPanic(0xc00185e600)
        	/go/src/github.com/docker/docker/internal/test/suite/suite.go:65 +0x57
        panic(0x1ad9bc0, 0xc0008100c0)
        	/usr/local/go/src/runtime/panic.go:679 +0x1b2
        github.com/docker/docker/integration-cli.(*DockerSuite).TestEventsContainerEvents(0x2f7d7a8, 0xc00185e600)
        	/go/src/github.com/docker/docker/integration-cli/docker_cli_events_test.go:89 +0x3c5
        reflect.Value.call(0xc0000c4f00, 0xc0008036c0, 0x13, 0x1bfd18b, 0x4, 0xc000e8df30, 0x2, 0x2, 0xc00075c618, 0x40d903, ...)
        	/usr/local/go/src/reflect/value.go:460 +0x5f6
        reflect.Value.Call(0xc0000c4f00, 0xc0008036c0, 0x13, 0xc00075c730, 0x2, 0x2, 0xf, 0x0, 0x0)
        	/usr/local/go/src/reflect/value.go:321 +0xb4
        github.com/docker/docker/internal/test/suite.Run.func2(0xc00185e600)
        	/go/src/github.com/docker/docker/internal/test/suite/suite.go:57 +0x2c2
        testing.tRunner(0xc00185e600, 0xc0008dbea0)
        	/usr/local/go/src/testing/testing.go:909 +0xc9
        created by testing.(*T).Run
        	/usr/local/go/src/testing/testing.go:960 +0x350
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-02 21:11:05 +02:00
Kirill Kolyshkin
58653d097c
Merge pull request #40014 from thaJeztah/fix_golint_copy_pasta
integration-cli: fix golint (copy/paste whoops)
2019-09-30 11:07:35 -07:00
Sebastiaan van Stijn
5c891ea9ca
integration-cli: fix DockerNetworkSuite not being run
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-30 15:49:33 +02:00
Sebastiaan van Stijn
f4c172e6b9
integration-cli: fix golint (copy/paste whoops)
These were accidentally wrong due to a sloppy copy/paste issue. Interestingly,
CI passed on the PR that added it (6397dd4d31),
possibly because of this issue, it stopped linting?

    WARN [runner/golint] Golint: can't lint 4 files: no file name for file &{Doc:<nil> Package:23044677 Name:quota Decls:[0xc02cc3fa40 0xc02cc3fac0 0xc02cc3fb40 0xc02cc3fbc0 0xc02cc62ab0 0xc02cc62c00] Scope:scope 0xc02cc5c340 {
     	var ErrQuotaNotSupported
     	type errQuotaNotSupported
     }
     Imports:[0xc02cc62930] Unresolved:[errdefs nil string] Comments:[0xc02cbc9ae0 0xc02cbc9c60]}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-30 14:59:00 +02:00
John Howard
8988448729 Remove refs to jhowardmsft from .go code
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-09-25 10:51:18 -07:00
Sebastiaan van Stijn
d79cc1b67d
testing: remove custom testingT interfaces
now that we no longer use gocheck, we should be able
to just use golang's own interface.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-23 13:54:51 +02:00
Sebastiaan van Stijn
3e4f6225da
testutil: remove unneeded namer, testname interfaces
Now that the gocheck framework is no longer used, we don't
have to define these interfaces.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-23 13:41:45 +02:00
Brian Goff
264e16c97b
Merge pull request #39876 from thaJeztah/TestCreateWithWorkdir_hyperv
integration-cli: update TestCreateWithWorkdir for Hyper-V isolation
2019-09-20 10:58:13 -07:00
Tibor Vass
5b7347c312 integration-cli: run goimports
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-09-19 21:34:23 +00:00
Tibor Vass
3cfb680bcc
Merge pull request #39885 from thaJeztah/debug_flaky_TestSwarmClusterRotateUnlockKey
integration-cli: add more debugging for TestSwarmClusterRotateUnlockKey
2019-09-19 11:08:15 -07:00
Tibor Vass
79da31de4f
Merge pull request #39959 from thaJeztah/fix_golint
integration-cli: fix golint issues
2019-09-19 10:54:37 -07:00
Vikram bir Singh
7de4e13089
Disable TestPsListContainersFilterExited (Windows)
On account of being flaky on both RS1 and RS5.

Co-Authored-By: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>
Signed-off-by: Vikram bir Singh <vikrambir.singh@docker.com>
2019-09-19 18:14:45 +02:00
Sebastiaan van Stijn
41ee87c681
Merge pull request #39942 from SamWhited/daemon_ops_type
testutil/daemon: group options under type
2019-09-19 17:44:49 +02:00
Sebastiaan van Stijn
78d137dd23
integration-cli: add more debugging for TestSwarmClusterRotateUnlockKey
This test was updated in b79adac339, but is still flaky;

```
20:24:13  FAIL: docker_cli_swarm_test.go:1333: DockerSwarmSuite.TestSwarmClusterRotateUnlockKey
20:24:13
20:24:13  Creating a new daemon at: /go/src/github.com/docker/docker/bundles/test-integration/3/DockerSwarmSuite.TestSwarmClusterRotateUnlockKey
20:24:13  [d6f95e679cb65] waiting for daemon to start
20:24:13  [d6f95e679cb65] waiting for daemon to start
20:24:13  [d6f95e679cb65] daemon started
20:24:13
20:24:13  Creating a new daemon at: /go/src/github.com/docker/docker/bundles/test-integration/3/DockerSwarmSuite.TestSwarmClusterRotateUnlockKey
20:24:13  [d204a02ba4780] waiting for daemon to start
20:24:13  [d204a02ba4780] waiting for daemon to start
20:24:13  [d204a02ba4780] daemon started
20:24:13
20:24:13  [d204a02ba4780] joining swarm manager [d6f95e679cb65]@0.0.0.0:2477, swarm listen addr 0.0.0.0:2478
20:24:13  Creating a new daemon at: /go/src/github.com/docker/docker/bundles/test-integration/3/DockerSwarmSuite.TestSwarmClusterRotateUnlockKey
20:24:13  [d873d6a842829] waiting for daemon to start
20:24:13  [d873d6a842829] waiting for daemon to start
20:24:13  [d873d6a842829] daemon started
20:24:13
20:24:13  [d873d6a842829] joining swarm manager [d6f95e679cb65]@0.0.0.0:2477, swarm listen addr 0.0.0.0:2479
20:24:13  [d204a02ba4780] Stopping daemon
20:24:13  [d204a02ba4780] exiting daemon
20:24:13  [d204a02ba4780] Daemon stopped
20:24:13  [d204a02ba4780] waiting for daemon to start
20:24:13  [d204a02ba4780] waiting for daemon to start
20:24:13  [d204a02ba4780] daemon started
20:24:13
20:24:13  [d873d6a842829] Stopping daemon
20:24:13  [d873d6a842829] exiting daemon
20:24:13  [d873d6a842829] Daemon stopped
20:24:13  [d873d6a842829] waiting for daemon to start
20:24:13  [d873d6a842829] waiting for daemon to start
20:24:13  [d873d6a842829] daemon started
20:24:13
20:24:13  docker_cli_swarm_test.go:1413:
20:24:13      c.Assert(err, checker.IsNil, check.Commentf("%s", outs))
20:24:13  ... value *exec.ExitError = &exec.ExitError{ProcessState:(*os.ProcessState)(0xc000934240), Stderr:[]uint8(nil)} ("exit status 1")
20:24:13  ... Error response from daemon: rpc error: code = Unknown desc = The swarm does not have a leader. It's possible that too few managers are online. Make sure more than half of the managers are online.
20:24:13
20:24:13
20:24:13  [d6f95e679cb65] Stopping daemon
20:24:13  [d6f95e679cb65] exiting daemon
20:24:13  [d6f95e679cb65] Daemon stopped
20:24:13  [d204a02ba4780] Stopping daemon
20:24:13  [d204a02ba4780] exiting daemon
20:24:13  [d204a02ba4780] Daemon stopped
20:24:13  [d873d6a842829] Stopping daemon
20:24:13  [d873d6a842829] exiting daemon
20:24:13  [d873d6a842829] Daemon stopped
```

The interesting bit there is that the retry loop should have a 3 second sleep before retrying,
but looking at the failure above, the test started (and failed) within a second, which means that
a different error / output was returned.

This patch adds some additional debugging to that test to see if we can catch the reason
this test is still flaky.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-19 15:01:46 +02:00
Sebastiaan van Stijn
6397dd4d31
integration-cli: fix golint issues
```
docker/integration-cli/checker/checker.go
Line 12: warning: exported type Compare should have comment or be unexported (golint)
Line 14: warning: exported function False should have comment or be unexported (golint)
Line 20: warning: exported function True should have comment or be unexported (golint)
Line 26: warning: exported function Equals should have comment or be unexported (golint)
Line 32: warning: exported function Contains should have comment or be unexported (golint)
Line 38: warning: exported function Not should have comment or be unexported (golint)
Line 52: warning: exported function DeepEquals should have comment or be unexported (golint)
Line 58: warning: exported function HasLen should have comment or be unexported (golint)
Line 64: warning: exported function IsNil should have comment or be unexported (golint)
Line 70: warning: exported function GreaterThan should have comment or be unexported (golint)
Line 76: warning: exported function NotNil should have comment or be unexported (golint)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-19 09:50:42 +02:00
Tibor Vass
f1c1cd436a integration-cli: move each test suite to its own TestX testing function
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-09-18 18:26:36 +00:00