Browse code

integration: Fix Parallel before setupTest

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Paweł Gronowski authored on 2024/01/17 19:34:13
Showing 2 changed files
... ...
@@ -78,12 +78,12 @@ func TestStopContainerWithTimeout(t *testing.T) {
78 78
 // if the request is cancelled.
79 79
 // See issue https://github.com/moby/moby/issues/45731
80 80
 func TestStopContainerWithTimeoutCancel(t *testing.T) {
81
-	t.Parallel()
82
-
83 81
 	ctx := setupTest(t)
84 82
 	apiClient := testEnv.APIClient()
85 83
 	t.Cleanup(func() { _ = apiClient.Close() })
86 84
 
85
+	t.Parallel()
86
+
87 87
 	id := container.Run(ctx, t, apiClient,
88 88
 		container.WithCmd("sh", "-c", "trap 'echo received TERM' TERM; while true; do usleep 10; done"),
89 89
 	)
... ...
@@ -111,9 +111,10 @@ func TestVolumesRemove(t *testing.T) {
111 111
 func TestVolumesRemoveSwarmEnabled(t *testing.T) {
112 112
 	skip.If(t, testEnv.IsRemoteDaemon, "cannot run daemon when remote daemon")
113 113
 	skip.If(t, testEnv.DaemonInfo.OSType == "windows", "TODO enable on windows")
114
-	t.Parallel()
115 114
 	ctx := setupTest(t)
116 115
 
116
+	t.Parallel()
117
+
117 118
 	// Spin up a new daemon, so that we can run this test in parallel (it's a slow test)
118 119
 	d := daemon.New(t)
119 120
 	d.StartAndSwarmInit(ctx, t)