8000 [19.03 backport] Testing and Jenkinsfile changes [step 2] by thaJeztah · Pull Request #383 · docker-archive/engine · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Conversation

thaJeztah
Copy link
Member
@thaJeztah thaJeztah commented Sep 26, 2019

built on top of #382 rebased

backports of:

# https://github.com/moby/moby/pull/38992 pkg/mount: optimizations
git cherry-pick -s -S -x \
	aa60541877a8a851524791a72ba3968e6764e137 \
	80fce834ad4f73bcee261982485ff9ec42a7e897 \
	4e65b17ac4e2792ae80c9415c68f9263c3d18db4 \
	a6773f69f26bf93a5183e41f66c1d36817c5b768 \
	ec248fe61d4209992ef3e0d5e7ab3ffcf7933fdd \
	1cfdb2ffb8dc3daf2afca89627d52697f16e7077
	

# https://github.com/moby/moby/pull/39799 Remove go-check
git cherry-pick -s -S -x \
	e07a3f291799b084bbe4dc293026b94aead74b4c \
	931edfe5e95ec2428274fb87e35602537dbabf53 \
	8f64611c83fcd66aa99ddf5a4fa1d0b5ce0ddef1 \
	5879446de9adbff7432f1ccaa781164fcd5efe26 \
	36e7001b996afda232318d5f286ed9bf55492654 \
	1f69c6254011bf654080d7e85465f43354a33910 \
	6ecff64d03083f21488f2e106d3b20bf4180fb26 \
	1d92789b4f5d058c10b30be4bd15ed334939f8d3 \
	a7d144fb347b0169efa847b7551beb8984634f5b \
	230f7bcc02569dfa916401ac6259643be8bb84f7 \
	74747b35e196d05d1389f5855dd41521f9fd9543 \
	0fa116fa8f39117fab069110ff6d5887831420b3 \
	10208e4d602164bea839d548deaa0bee085383a5 \
	6dc7f4c16785687139ad94dd23a4127a1359289d \
	dd9d28669fca5303cf7cf0f72a47d6797f524c72 \
	491ef7b90155060625d368ac8218955d1377ae10 \
	2743e2d8bc7248a5c2f90610e127a0939bbb3e0c \
	64a161aa3e84c51e64600f9b665bcaf131d9fdd6 \
	b17bb1e74a6643901cbc5a63570ed47ef8dfddcd \
	d0fc8d082dc033b3fed31dfa59fd327ce4c61923 \
	6a8a9738ec681b40af8f6018a1e0deff3d770713 \
	81d2a0c3898a7047dd12858223fda3aee6931eb0 \
	eb67bb9fb59dfb4c346124bc8090ef80da35cf8f \
	59e55dcdd063d3131ed1992254350b7014d1bf1f \
	f2c9e391fc889ace2b5c2536cb1483922356c98c \
	4e2e486b23fc4866040e04d17fd2924ee8c6921e \
	98f2638fe5f963203e359c0f2b6387d70285fbe3 \
	a2024a547092109a9c9dd9b224a586a777c4824d \
	6135eec30a6dc1482225dece6a160da89992a072 \
	6e5cf532af890fd5818ae5e1849d1492fa11ee55 \
	3a24472c8e00ebaac9dfe9beee552a927aa504c7 \
	7813dfe9d709ece48b5fc3f804a2eaed1685b7e7 \
	64de5e82289b1a97b3a9757959210a0400a602f7 \
	318b1612e1a74f1313d5bd087050cd535f267bd5 \
	42599f1cad9f5eaa3f3cca5a9de43b7ff2c00006 \
	ac2f24e72a312da8836480f80cc191c44db7d199 \
	40f1950e8ea84a8518c7378d0e8cbe9142e3b0cf \
	649201dc4429fa8f734eaf6cd89cccd7eb2d9119 \
	9843c2f12c2a9c3e4943d84697c2b2298e78877e \
	3aa4ff64aa4a501731066ede81c50ffc0d6d107e \
	fd0ed80ff2f15370bf0606632e274d946394bb54 \
	8b40da168b34ea8dacf1eb22e747b0e72acf9247 \
	925e407c7bec78416b2616ca22a35f6b8abef5e1 \
	7491db3e92ba9764c8233365f07a87ce133c2d87 \
	7cd028f2d0ef91b1f05c6fc824c140fa66025b64 \
	beadc92e0781a32854f4cbb8389804a06730c351 \
	8bffe9524daacf84815d4dc7777b1cbd58d13718 \
	bad6f3bf738806a5e24c39124506c670fec69f31 \
	8eb9f3f90ebca83c500c1e60857a834fc1ea7e8a \
	cc01289792d918856d0c1a0cf38008f32d3d5bc7 \
	d32e6bbde815f37aa1cb23f602ab6371b509f3b2 \
	231ed42cab0cb070a125e63b5baff332fbf7031f

# Skipped beadc92e0781a32854f4cbb8389804a06730c351 because it was already reverted

# https://github.com/moby/moby/pull/39688 integration-cli/requirements: Skip windows specific isolation requirements on non-windows
git cherry-pick -s -S -x b469933b063169718987865b8b1215cb7befd1a6

# https://github.com/moby/moby/pull/39902 integration-cli: remove unneeded sprintf's in asserts
git cherry-pick -s -S -x 0fabf3e41ec3cc0ba5479ce91e278c1e7855eebd

# https://github.com/moby/moby/pull/39911 hack: have integration-cli use gotestsum codepath
git cherry-pick -s -S -x 84928be6059084c608f6d071f7121ab42bee721c
git cherry-pick -s -S -x f1c1cd436ae1252778417121e77d084172f628a1

# https://github.com/moby/moby/pull/39930 hack/test/unit: fix custom TESTFLAGS not working
git cherry-pick -s -S -x 0620990307aaf8ada706ffb6c5dc0628c92d84af

# https://github.com/moby/moby/pull/39945 Disable TestPsListContainersFilterExited (Windows)
git cherry-pick -s -S -x 7de4e130898fc1cf74f8c4fec24416c3f7d3589b

# https://github.com/moby/moby/pull/39965 integration-cli: run goimports
git cherry-pick -s -S -x 5b7347c312161da0b64c551fee70c111ff5c9ec6

# https://github.com/moby/moby/pull/39959 integration-cli: fix golint issues
git cherry-pick -s -S -x 6397dd4d3123e0a1b89298d0a2cfe5388410a74f

@thaJeztah
Copy link
Member Author

argh; missed moby#39965. Forgot to label it for backporting

@thaJeztah thaJeztah force-pushed the 19.03_backport_test_fixes_2 branch 2 times, most recently from 54afed3 to 177894f Compare September 26, 2019 16:19
@thaJeztah
Copy link
Member Author

whoop - this is green; rebased, because I moved moby#39984 to the other PR. I'll rebase once more once the other PR is merged

@thaJeztah
Copy link
Member Author

green again; rebasing in a bit now that the other one was merge

kolyshkin and others added 21 commits September 26, 2019 23:51
Current code in MakeMount parses /proc/self/mountinfo twice:
first in call to Mounted(), then in call to Mount(). Use
ForceMount() to eliminate such double parsing.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit aa60541)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Eliminate double call to parseOptions() from Mount()

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 80fce83)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
For bind mounts, fstype argument to mount(2) is ignored.
Usual convention is either empty string or "none".

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 4e65b17)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
It is sufficient to add "rprivate" to mount flags.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit a6773f6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The only option we supply is either BIND or a mount propagation flag,
so it makes sense to specify the flag value directly, rather than using
parseOptions() every time.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ec248fe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Don't use two-stage mount in TestContainersAPICreateMountsCreate();
apparently it was written before mount.Mount() could accept propagation
flags.

While at it, remove rw as this is the default.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1cfdb2f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…uld not compile

Tests fixed in this patch used to compile and pass successfully,
despite checking if non-nullable types are not nil.

These would have become compile errors once go-check is removed.

About TestContainerAPIPsOmitFields:
Basically what happened is that this test got refactored to start using the API types
and API client library instead of custom types and stdlib's http functions.
This test used to test an API regression which could possibly be a unit test.
However because PublicPort and IP are not nullable types, this test became useless.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit e07a3f2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 931edfe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The following "rm-gocheck:"-prefixed commits were generated by
go run rm-gocheck.go --commit

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8f64611)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bc\.Check\(#c.Assert(#g' \
-- "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_run_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 5879446)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
go run rm-gocheck.go redress '\bc\.Assert\b.*(,|\()\s*$' \
 "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_volume_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 36e7001)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bc\.Assert\(#assert.Assert(c, #g' \
-- "integration-cli/docker_api_containers_test.go" "integration-cli/docker_api_swarm_node_test.go" "integration-cli/docker_cli_attach_test.go" "integration-cli/docker_cli_attach_unix_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_commit_test.go" "integration-cli/docker_cli_cp_from_container_test.go" "integration-cli/docker_cli_cp_to_container_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_history_test.go" "integration-cli/docker_cli_images_test.go" "integration-cli/docker_cli_import_test.go" "integration-cli/docker_cli_info_test.go" "integration-cli/docker_cli_info_unix_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_links_test.go" "integration-cli/docker_cli_netmode_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_plugins_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_prune_unix_test.go" "integration-cli/docker_cli_ps_test.go" "integration-cli/docker_cli_pull_local_test.go" "integration-cli/docker_cli_rmi_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_run_unix_test.go" "integration-cli/docker_cli_save_load_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_service_health_test.go" "integration-cli/docker_cli_start_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_userns_test.go" "integration-cli/docker_cli_volume_test.go" "integration-cli/docker_hub_pull_suite_test.go" "integration-cli/docker_utils_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/generator_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go" "pkg/discovery/nodes/nodes_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 1f69c62)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#( Benchmark[^\(]+\([^ ]+ \*)check\.C\b#\1testing.B#g' \
-- "integration-cli/benchmark_test.go" "integration-cli/docker_cli_logs_bench_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 6ecff64)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bcheck\.C\b#testing.T#g' \
-- "integration-cli/check_test.go" "integration-cli/daemon/daemon.go" "integration-cli/daemon/daemon_swarm.go" "integration-cli/daemon_swarm_hack_test.go" "integration-cli/docker_api_attach_test.go" "integration-cli/docker_api_build_test.go" "integration-cli/docker_api_build_windows_test.go" "integration-cli/docker_api_containers_test.go" "integration-cli/docker_api_containers_windows_test.go" "integration-cli/docker_api_exec_resize_test.go" "integration-cli/docker_api_exec_test.go" "integration-cli/docker_api_images_test.go" "integration-cli/docker_api_inspect_test.go" "integration-cli/docker_api_logs_test.go" "integration-cli/docker_api_network_test.go" "integration-cli/docker_api_stats_test.go" "integration-cli/docker_api_swarm_node_test.go" "integration-cli/docker_api_swarm_service_test.go" "integration-cli/docker_api_swarm_test.go" "integration-cli/docker_api_test.go" "integration-cli/docker_cli_attach_test.go" "integration-cli/docker_cli_attach_unix_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_commit_test.go" "integration-cli/docker_cli_cp_from_container_test.go" "integration-cli/docker_cli_cp_test.go" "integration-cli/docker_cli_cp_to_container_test.go" "integration-cli/docker_cli_cp_to_container_unix_test.go" "integration-cli/docker_cli_cp_utils_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_plugins_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_events_test.go" "integration-cli/docker_cli_events_unix_test.go" "integration-cli/docker_cli_exec_test.go" "integration-cli/docker_cli_exec_unix_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_history_test.go" "integration-cli/docker_cli_images_test.go" "integration-cli/docker_cli_import_test.go" "integration-cli/docker_cli_info_test.go" "integration-cli/docker_cli_info_unix_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_links_test.go" "integration-cli/docker_cli_login_test.go" "integration-cli/docker_cli_logout_test.go" "integration-cli/docker_cli_logs_test.go" "integration-cli/docker_cli_netmode_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_plugins_logdriver_test.go" "integration-cli/docker_cli_plugins_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_proxy_test.go" "integration-cli/docker_cli_prune_unix_test.go" "integration-cli/docker_cli_ps_test.go" "integration-cli/docker_cli_pull_local_test.go" "integration-cli/docker_cli_pull_test.go" "integration-cli/docker_cli_push_test.go" "integration-cli/docker_cli_registry_user_agent_test.go" "integration-cli/docker_cli_restart_test.go" "integration-cli/docker_cli_rmi_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_run_unix_test.go" "integration-cli/docker_cli_save_load_test.go" "integration-cli/docker_cli_save_load_unix_test.go" "integration-cli/docker_cli_search_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_service_health_test.go" "integration-cli/docker_cli_service_logs_test.go" "integration-cli/docker_cli_service_scale_test.go" "integration-cli/docker_cli_sni_test.go" "integration-cli/docker_cli_start_test.go" "integration-cli/docker_cli_stats_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_swarm_unix_test.go" "integration-cli/docker_cli_top_test.go" "integration-cli/docker_cli_update_unix_test.go" "integration-cli/docker_cli_userns_test.go" "integration-cli/docker_cli_v2_only_test.go" "integration-cli/docker_cli_volume_test.go" "integration-cli/docker_deprecated_api_v124_test.go" "integration-cli/docker_deprecated_api_v124_unix_test.go" "integration-cli/docker_hub_pull_suite_test.go" "integration-cli/docker_utils_test.go" "integration-cli/events_utils_test.go" "integration-cli/fixtures_linux_daemon_test.go" "integration-cli/utils_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/generator_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go" "pkg/discovery/nodes/nodes_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 1d92789)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bassert\.Assert\(c, (.*), check\.ErrorMatches,#assert.ErrorContains(c, \1,#g' \
-- "pkg/discovery/kv/kv_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit a7d144f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bcheck\.(Equals|DeepEquals|HasLen|IsNil|Matches|Not|NotNil)\b#checker.\1#g' \
-- "integration-cli/docker_api_containers_test.go" "integration-cli/docker_cli_attach_test.go" "integration-cli/docker_cli_attach_unix_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_images_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_netmode_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_run_unix_test.go" "integration-cli/docker_cli_save_load_test.go" "integration-cli/docker_cli_service_health_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_volume_test.go" "integration-cli/docker_utils_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/generator_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go" "pkg/discovery/nodes/nodes_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 230f7bc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.Not\(checker\.IsNil\)#assert.Assert(c, \1 != nil#g' \
-- "integration-cli/docker_api_containers_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_volume_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 74747b3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.Not\(checker\.Equals\), (.*)#assert.Assert(c, \1 != \2#g' \
-- "integration-cli/docker_api_containers_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_prune_unix_test.go" "integration-cli/docker_cli_ps_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_save_load_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_volume_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 0fa116f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.Not\(checker\.Matches\), (.*)\)#assert.Assert(c, !is.Regexp("^"+\2+"$", \1)().Success())#g' \
-- "integration-cli/docker_cli_images_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 10208e4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.Equals, (.*)#assert.Equal(c, \1, \2#g' \
-- "integration-cli/docker_api_containers_test.go" "integration-cli/docker_api_swarm_node_test.go" "integration-cli/docker_cli_attach_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_commit_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_images_test.go" "integration-cli/docker_cli_import_test.go" "integration-cli/docker_cli_info_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_links_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_plugins_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_ps_test.go" "integration-cli/docker_cli_rmi_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_run_unix_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_service_health_test.go" "integration-cli/docker_cli_start_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_userns_test.go" "integration-cli/docker_cli_volume_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/generator_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/nodes/nodes_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 6dc7f4c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
sed -E -i 's#\bassert\.Assert\(c, (.*), checker\.DeepEquals, (.*)#assert.DeepEqual(c, \1, \2#g' \
-- "integration-cli/docker_cli_daemon_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go"

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit dd9d286)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Tibor Vass and others added 20 commits September 26, 2019 23:52
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 3aa4ff6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit fd0ed80)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8b40da1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 925e407)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 7491db3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- remove -check.* flags
- use (per-test) -timeout flag
- allow user to override TEST_SKIP_* regardless of TESTFLAGS
- remove test-imports validation

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 7cd028f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8bffe95)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit bad6f3b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8eb9f3f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit cc01289)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d32e6bb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 231ed42)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…ments on non-windows

After the commit faaffd5 ("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.

moby#39625

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
(cherry picked from commit b469933)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Repl
9E81
aced using a bit of grep-ing;

```
find . -name "*_test.go" -exec sed -E -i 's#assert.Assert\((.*), fmt.Sprintf\((.*)\)\)$#assert.Assert\(\1, \2\)#g' '{}' \;
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0fabf3e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 84928be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f1c1cd4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The `-test.timeout=5m` was glued directly after the current `TESTFLAGS`,
causing them to be non-functional;

Before:

    make TESTDEBUG=1 TESTDIRS='github.com/docker/docker/pkg/filenotify' TESTFLAGS='-test.run TestPollerEvent' test-unit
    + mkdir -p bundles
    + gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- -tags 'netgo seccomp libdm_no_deferred_remove' -cover -coverprofile=bundles/profile.out -covermode=atomic -test.run TestPollerEvent-test.timeout=5m github.com/docker/docker/pkg/filenotify
    testing: warning: no tests to run
    ok  	github.com/docker/docker/pkg/filenotify	0.003s	coverage: 0.0% of statements [no tests to run]

    DONE 0 tests in 0.298s

After:

    make TESTDEBUG=1 TESTDIRS='github.com/docker/docker/pkg/filenotify' TESTFLAGS='-test.run TestPollerEvent' test-unit
    + mkdir -p bundles
    + gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- -tags 'netgo seccomp libdm_no_deferred_remove' -cover -coverprofile=bundles/profile.out -covermode=atomic -test.run TestPollerEvent -test.timeout=5m github.com/docker/docker/pkg/filenotify
    ok  	github.com/docker/docker/pkg/filenotify	0.608s	coverage: 44.7% of statements

    DONE 1 tests in 0.922s

This was introduced in 42f0a0d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0620990)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
(cherry picked from commit 7de4e13)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 5b7347c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
```
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>
(cherry picked from commit 6397dd4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 19.03_backport_test_fixes_2 branch from 177894f to 06f11ab Compare September 26, 2019 21:53
@thaJeztah
Copy link
Member Author

Rebased and ready for review

@tiborvass @kolyshkin PTAL

. ${SCRIPTDIR}/test-imports
. ${SCRIPTDIR}/toml
. ${SCRIPTDIR}/changelog-well-formed
. ${SCRIPTDIR}/changelog-date-descending
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this is merged, I'll have to cherry-pick moby#39897 (Re-enable disable deprecate-integration-cli)

Copy link
@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiborvass
Copy link

Probably for after 19.03.3 is released

Copy link
@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

i trust the tests and the tests are green

@andrewhsu andrewhsu merged commit b6a7124 into docker-archive:19.03 Sep 27, 2019
@thaJeztah thaJeztah deleted the 19.03_backport_test_fixes_2 branch September 28, 2019 00:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0