feat: quiten miro test ouput
This commit is contained in:
@@ -226,8 +226,6 @@ func TestRunTest(t *testing.T) {
|
|||||||
"RUN nested/b",
|
"RUN nested/b",
|
||||||
"PASS nested/b",
|
"PASS nested/b",
|
||||||
"Summary: total=2 passed=2 failed=0",
|
"Summary: total=2 passed=2 failed=0",
|
||||||
"echo one\n",
|
|
||||||
"echo two\n",
|
|
||||||
} {
|
} {
|
||||||
if !strings.Contains(stdout, want) {
|
if !strings.Contains(stdout, want) {
|
||||||
t.Fatalf("stdout = %q, want substring %q", stdout, want)
|
t.Fatalf("stdout = %q, want substring %q", stdout, want)
|
||||||
|
|||||||
@@ -222,8 +222,8 @@ func replayScenario(scenario testScenario, shellPath string, tio testIO, sandbox
|
|||||||
compareMarkerEnvName: compareMarkerEnabledValue,
|
compareMarkerEnvName: compareMarkerEnabledValue,
|
||||||
})
|
})
|
||||||
cmd.Stdin = bytes.NewReader(input)
|
cmd.Stdin = bytes.NewReader(input)
|
||||||
cmd.Stdout = tio.out
|
cmd.Stdout = io.Discard
|
||||||
cmd.Stderr = tio.err
|
cmd.Stderr = io.Discard
|
||||||
|
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
return fmt.Errorf("replay failed: %v", err)
|
return fmt.Errorf("replay failed: %v", err)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ func TestDiscoverTestScenariosRejectsMissingInFixture(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestReplayScenarioUsesRecordedInputAndStripsScriptWrapper(t *testing.T) {
|
func TestReplayScenarioUsesRecordedInputAndKeepsReplayOutputQuiet(t *testing.T) {
|
||||||
addFakeRecordDependencies(t, "script")
|
addFakeRecordDependencies(t, "script")
|
||||||
t.Setenv("FAKE_SCRIPT_ECHO_STDIN", "1")
|
t.Setenv("FAKE_SCRIPT_ECHO_STDIN", "1")
|
||||||
|
|
||||||
@@ -97,8 +97,8 @@ func TestReplayScenarioUsesRecordedInputAndStripsScriptWrapper(t *testing.T) {
|
|||||||
if got := readFile(t, capturedInput); got != "echo replay\nexit\n" {
|
if got := readFile(t, capturedInput); got != "echo replay\nexit\n" {
|
||||||
t.Fatalf("captured stdin = %q, want recorded input", got)
|
t.Fatalf("captured stdin = %q, want recorded input", got)
|
||||||
}
|
}
|
||||||
if got := stdout.String(); !strings.Contains(got, "echo replay\nexit\n") {
|
if stdout.String() != "" {
|
||||||
t.Fatalf("stdout = %q, want streamed replay output", got)
|
t.Fatalf("stdout = %q, want empty", stdout.String())
|
||||||
}
|
}
|
||||||
if stderr.String() != "" {
|
if stderr.String() != "" {
|
||||||
t.Fatalf("stderr = %q, want empty", stderr.String())
|
t.Fatalf("stderr = %q, want empty", stderr.String())
|
||||||
|
|||||||
Reference in New Issue
Block a user