Skip to content

Commit e10045d

Browse files
refactor: replace SubTests with Setup+helper in TestMultiPlatformRun
SubTests run via t.Parallel() in Tigron, which caused concurrent docker runs across platforms to fail in the in-host/docker CI job. The original test iterated platforms sequentially; use the existing assertMultiPlatformRun helper inside Setup to preserve that behavior. Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
1 parent a1ad17d commit e10045d

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

cmd/nerdctl/container/multi_platform_linux_test.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,8 @@ func TestMultiPlatformRun(t *testing.T) {
7777

7878
testCase.Require = requireMultiPlatformExec
7979

80-
testCasePlatforms := map[string]string{
81-
"amd64": "x86_64",
82-
"arm64": "aarch64",
83-
"arm": "armv7l",
84-
"linux/arm": "armv7l",
85-
"linux/arm/v7": "armv7l",
86-
}
87-
for plat, expectedUnameM := range testCasePlatforms {
88-
p, e := plat, expectedUnameM
89-
testCase.SubTests = append(testCase.SubTests, &test.Case{
90-
Description: p,
91-
Command: test.Command("run", "--rm", "--platform="+p, testutil.AlpineImage, "uname", "-m"),
92-
Expected: test.Expects(expect.ExitCodeSuccess, nil, expect.Equals(e+"\n")),
93-
})
80+
testCase.Setup = func(_ test.Data, helpers test.Helpers) {
81+
assertMultiPlatformRun(helpers, testutil.AlpineImage)
9482
}
9583

9684
testCase.Run(t)

0 commit comments

Comments
 (0)