Skip to content

Commit

Permalink
Remove unbuffer from test
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <[email protected]>
  • Loading branch information
apostasie committed Oct 17, 2024
1 parent 7a0eaec commit 517f1f3
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions cmd/nerdctl/issues/main_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,21 @@ func TestIssue108(t *testing.T) {
testCase.SubTests = []*test.Case{
{
Description: "-it --net=host",
Require: test.Binary("unbuffer"),
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
cmd := helpers.
Command("run", "-it", "--rm", "--net=host", testutil.AlpineImage, "echo", "this was always working")
cmd.WithWrapper("unbuffer")
cmd := helpers.Command("run", "-it", "--rm", "--net=host", testutil.AlpineImage, "echo", "this was always working")
cmd.WithPseudoTTY()
return cmd
},
// Note: unbuffer will merge stdout and stderr, preventing exact match here
Expected: test.Expects(0, nil, test.Contains("this was always working")),
Expected: test.Expects(0, nil, test.Equals("this was always working\r\n")),
},
{
Description: "--net=host -it",
Require: test.Binary("unbuffer"),
Command: func(data test.Data, helpers test.Helpers) test.TestableCommand {
cmd := helpers.
Command("run", "--rm", "--net=host", "-it", testutil.AlpineImage, "echo", "this was not working due to issue #108")
cmd.WithWrapper("unbuffer")
cmd := helpers.Command("run", "--rm", "--net=host", "-it", testutil.AlpineImage, "echo", "this was not working due to issue #108")
cmd.WithPseudoTTY()
return cmd
},
// Note: unbuffer will merge stdout and stderr, preventing exact match here
Expected: test.Expects(0, nil, test.Contains("this was not working due to issue #108")),
Expected: test.Expects(0, nil, test.Equals("this was not working due to issue #108\r\n")),
},
}

Expand Down

0 comments on commit 517f1f3

Please sign in to comment.