Skip to content

Commit ae88b79

Browse files
authored
fix(cli): stat: set --host arg in TestStatCPUCmd to avoid test flakes in containers (#8806)
1 parent 607cd11 commit ae88b79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/stat_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func TestStatCPUCmd(t *testing.T) {
7474
t.Parallel()
7575
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
7676
t.Cleanup(cancel)
77-
inv, _ := clitest.New(t, "stat", "cpu", "--output=text")
77+
inv, _ := clitest.New(t, "stat", "cpu", "--output=text", "--host")
7878
buf := new(bytes.Buffer)
7979
inv.Stdout = buf
8080
err := inv.WithContext(ctx).Run()
@@ -87,7 +87,7 @@ func TestStatCPUCmd(t *testing.T) {
8787
t.Parallel()
8888
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
8989
t.Cleanup(cancel)
90-
inv, _ := clitest.New(t, "stat", "cpu", "--output=json")
90+
inv, _ := clitest.New(t, "stat", "cpu", "--output=json", "--host")
9191
buf := new(bytes.Buffer)
9292
inv.Stdout = buf
9393
err := inv.WithContext(ctx).Run()

0 commit comments

Comments
 (0)