Skip to content

Commit 1ab6df3

Browse files
committed
(Un-)marking flaky tests
- containerd#3512 is likely fixed, so, deflaking test - a couple of other circumstances failed the build (one of them with Docker) - commenting in-line - marking another instance of containerd#3524 Signed-off-by: apostasie <[email protected]>
1 parent 468b0df commit 1ab6df3

File tree

7 files changed

+25
-1
lines changed

7 files changed

+25
-1
lines changed

cmd/nerdctl/container/container_create_linux_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ func TestCreateWithMACAddress(t *testing.T) {
131131
// res = base.Cmd("start", "-i", containerName).
132132
// CmdOption(testutil.WithStdin(strings.NewReader("ip addr show eth0 | grep ether | awk '{printf $2}'"))).Run()
133133
res = base.Cmd("start", "-a", containerName).Run()
134+
// FIXME: flaky - this has failed on the CI once, with the output NOT containing anything
135+
// https://github.com/containerd/nerdctl/actions/runs/11392051487/job/31697214002?pr=3535#step:7:271
134136
assert.Assert(t, strings.Contains(res.Stdout(), expect), fmt.Sprintf("expected output to contain %q: %q", expect, res.Stdout()))
135137
assert.Assert(t, res.ExitCode == 0, "Command should have succeeded")
136138
} else {

cmd/nerdctl/container/container_logs_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ func TestLogsOutStreamsSeparated(t *testing.T) {
8282
}
8383

8484
func TestLogsWithInheritedFlags(t *testing.T) {
85+
// Seen flaky with Docker
8586
t.Parallel()
8687
base := testutil.NewBase(t)
8788
for k, v := range base.Args {

cmd/nerdctl/container/container_stop_linux_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ func TestStopStart(t *testing.T) {
7373

7474
func TestStopWithStopSignal(t *testing.T) {
7575
t.Parallel()
76+
// There may be issues with logs in Docker.
77+
// This test is flaky with Docker. Might be related to https://github.com/containerd/nerdctl/pull/3557
7678
base := testutil.NewBase(t)
7779
testContainerName := testutil.Identifier(t)
7880
defer base.Cmd("rm", "-f", testContainerName).Run()

cmd/nerdctl/image/image_inspect_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package image
1818

1919
import (
2020
"encoding/json"
21+
"runtime"
2122
"strings"
2223
"testing"
2324

@@ -63,6 +64,10 @@ func TestImageInspectSimpleCases(t *testing.T) {
6364
},
6465
}
6566

67+
if runtime.GOOS == "windows" {
68+
testCase.Require = nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3524")
69+
}
70+
6671
testCase.Run(t)
6772
}
6873

cmd/nerdctl/image/image_list_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package image
1818

1919
import (
2020
"fmt"
21+
"runtime"
2122
"slices"
2223
"strings"
2324
"testing"
@@ -117,6 +118,13 @@ func TestImages(t *testing.T) {
117118
},
118119
}
119120

121+
if runtime.GOOS == "windows" {
122+
testCase.Require = test.Require(
123+
testCase.Require,
124+
nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3524"),
125+
)
126+
}
127+
120128
testCase.Run(t)
121129
}
122130

@@ -189,7 +197,6 @@ RUN echo "actually creating a layer so that docker sets the createdAt time"
189197
},
190198
{
191199
Description: "label=version",
192-
Require: nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3512"),
193200
Command: test.Command("images", "--filter", "label=version"),
194201
Expected: func(data test.Data, helpers test.Helpers) *test.Expected {
195202
return &test.Expected{

cmd/nerdctl/image/image_save_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package image
1919
import (
2020
"os"
2121
"path/filepath"
22+
"runtime"
2223
"strings"
2324
"testing"
2425

@@ -70,6 +71,10 @@ func TestSave(t *testing.T) {
7071
// See https://github.com/containerd/nerdctl/issues/3425 and others for details.
7172
testCase.Require = nerdtest.Private
7273

74+
if runtime.GOOS == "windows" {
75+
testCase.Require = nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3524")
76+
}
77+
7378
testCase.SubTests = []*test.Case{
7479
{
7580
Description: "Single image, by id",

cmd/nerdctl/ipfs/ipfs_compose_linux_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func TestIPFSCompNoBuild(t *testing.T) {
4646
test.Not(nerdtest.Docker),
4747
nerdtest.Registry,
4848
nerdtest.IPFS,
49+
nerdtest.IsFlaky("https://github.com/containerd/nerdctl/issues/3510"),
4950
// See note below
5051
// nerdtest.Private,
5152
)
@@ -153,6 +154,7 @@ services:
153154
WORDPRESS_DB_USER: exampleuser
154155
WORDPRESS_DB_PASSWORD: examplepass
155156
WORDPRESS_DB_NAME: exampledb
157+
# FIXME: this is flaky and will make the container fail on occasions
156158
volumes:
157159
- wordpress:/var/www/html
158160

0 commit comments

Comments
 (0)