moby/integration-cli
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
..
checker integration-cli: fix golint (copy/paste whoops) 2019-09-30 14:59:00 +02:00
cli testing: remove custom testingT interfaces 2019-09-23 13:54:51 +02:00
daemon testing: remove custom testingT interfaces 2019-09-23 13:54:51 +02:00
environment testutil: make testing packages public 2019-09-11 07:47:23 -05:00
fixtures Clean some integration-cli/fixtures package/files 2018-04-16 10:48:58 +02:00
requirement prepare for rm-gocheck script 2019-09-09 20:49:53 +00:00
testdata Clean some integration-cli/fixtures package/files 2018-04-16 10:48:58 +02:00
benchmark_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
check_test.go integration-cli: fix DockerNetworkSuite not being run 2019-09-30 15:49:33 +02:00
daemon_swarm_hack_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_api_attach_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_api_build_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_api_build_windows_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_api_containers_test.go misspell: fix some spelling issues 2019-09-18 12:57:48 +02:00
docker_api_containers_windows_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_api_exec_resize_test.go integration-cli: fix capitalization of variables and errors (golint) 2019-09-18 12:56:56 +02:00
docker_api_exec_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_api_images_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_api_inspect_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_api_logs_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_api_network_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_api_stats_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_api_swarm_node_test.go waitAndAssert -> poll.WaitOn 2019-09-09 21:09:57 +00:00
docker_api_swarm_service_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_api_swarm_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_api_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_cli_attach_test.go Remove refs to jhowardmsft from .go code 2019-09-25 10:51:18 -07:00
docker_cli_attach_unix_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_build_test.go Remove refs to jhowardmsft from .go code 2019-09-25 10:51:18 -07:00
docker_cli_build_unix_test.go goimports: fix imports 2019-09-18 12:56:54 +02:00
docker_cli_by_digest_test.go integration-cli: use raw strings for regexes (gosimple) 2019-09-18 12:56:58 +02:00
docker_cli_commit_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_cp_from_container_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_cp_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_cp_to_container_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_cp_to_container_unix_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_cp_utils_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_create_test.go Merge pull request #39876 from thaJeztah/TestCreateWithWorkdir_hyperv 2019-09-20 10:58:13 -07:00
docker_cli_daemon_plugins_test.go integration-cli: remove unused functions and enable disabled tests 2019-09-18 12:56:59 +02:00
docker_cli_daemon_test.go Use io.SeekStart instead of os.SEEK_SET 2019-09-18 12:57:31 +02:00
docker_cli_events_test.go integration-cli: prevent out of range in TestEventsContainerEvents 2019-10-02 21:11:05 +02:00
docker_cli_events_unix_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_exec_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_exec_unix_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_external_volume_driver_test.go integration-cli: S1025: the argument is already a string (gosimple) 2019-09-18 12:57:04 +02:00
docker_cli_health_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_history_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_images_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_import_test.go integration-cli: use raw strings for regexes (gosimple) 2019-09-18 12:56:58 +02:00
docker_cli_info_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_info_unix_test.go rm-gocheck: Contains -> strings.Contains 2019-09-09 21:08:22 +00:00
docker_cli_inspect_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_links_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_login_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_logout_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_logs_bench_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_logs_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_netmode_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_network_test.go Setup tests 2019-09-09 21:09:57 +00:00
docker_cli_network_unix_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_plugins_logdriver_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_plugins_test.go integration-cli: S1025: the argument is already a string (gosimple) 2019-09-18 12:57:04 +02:00
docker_cli_port_test.go integration-cli: fix capitalization of variables and errors (golint) 2019-09-18 12:56:56 +02:00
docker_cli_proxy_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_prune_unix_test.go fix remaining issues with checker.Not 2019-09-09 21:09:57 +00:00
docker_cli_ps_test.go integration-cli: run goimports 2019-09-19 21:34:23 +00:00
docker_cli_pull_local_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_pull_test.go goimports: fix imports 2019-09-18 12:56:54 +02:00
docker_cli_push_test.go integration-cli: fix TestPushMultipleTags 2019-09-18 12:57:02 +02:00
docker_cli_registry_user_agent_test.go integration-cli: SA5001: should check returned error before deferring reg.Close() (staticcheck) 2019-09-18 12:57:03 +02:00
docker_cli_restart_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_rmi_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_run_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_run_unix_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_save_load_test.go integration-cli: use raw strings for regexes (gosimple) 2019-09-18 12:56:58 +02:00
docker_cli_save_load_unix_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_search_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_service_create_test.go Fix more signal handling issues in tests. 2019-09-11 13:09:33 -07:00
docker_cli_service_health_test.go waitAndAssert -> poll.WaitOn 2019-09-09 21:09:57 +00:00
docker_cli_service_logs_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_service_scale_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_sni_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_start_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_cli_stats_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_swarm_test.go integration-cli: add more debugging for TestSwarmClusterRotateUnlockKey 2019-09-19 15:01:46 +02:00
docker_cli_swarm_unix_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_top_test.go rm-gocheck: run goimports to compile successfully 2019-09-09 21:06:12 +00:00
docker_cli_update_unix_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_cli_userns_test.go Fix more signal handling issues in tests. 2019-09-11 13:09:33 -07:00
docker_cli_v2_only_test.go integration-cli: SA5001: should check returned error before deferring reg.Close() (staticcheck) 2019-09-18 12:57:03 +02:00
docker_cli_volume_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
docker_deprecated_api_v124_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_deprecated_api_v124_unix_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
docker_hub_pull_suite_test.go integration-cli: remove unneeded fmt.Sprintf() in asserts 2019-09-11 16:18:04 +02:00
docker_utils_test.go integration-cli: remove unused functions and enable disabled tests 2019-09-18 12:56:59 +02:00
events_utils_test.go integration-cli: remove unused functions and enable disabled tests 2019-09-18 12:56:59 +02:00
fixtures_linux_daemon_test.go integration-cli: remove unused functions and enable disabled tests 2019-09-18 12:56:59 +02:00
requirements_test.go integration-cli: remove unnescessary conversions (unconvert) 2019-09-18 12:57:01 +02:00
requirements_unix_test.go integration-cli: remove unused requirements utils 2019-07-08 18:58:46 +02:00
test_vars_noseccomp_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
test_vars_seccomp_test.go Introduce a environment package in integration-cli 2016-12-29 11:00:50 +01:00
test_vars_test.go Remove deprecated environment.DaemonPlatform() 2018-01-15 15:32:06 +01:00
test_vars_unix_test.go integration-cli: remove defaultSleepImage constant 2019-07-08 18:42:08 +02:00
test_vars_windows_test.go integration-cli: remove defaultSleepImage constant 2019-07-08 18:42:08 +02:00
utils_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00