diff --git a/internal/statemachine/helper_test.go b/internal/statemachine/helper_test.go index db88932f..a367e463 100644 --- a/internal/statemachine/helper_test.go +++ b/internal/statemachine/helper_test.go @@ -1388,14 +1388,14 @@ func TestStateMachine_updateGrub_checkcmds(t *testing.T) { execCommand = mockCmder.Command t.Cleanup(func() { execCommand = exec.Command }) - stdout, restoreStdout, err := helper.CaptureStd(&os.Stdout) + stdout, restoreStdout, _ := helper.CaptureStd(&os.Stdout) t.Cleanup(func() { restoreStdout() }) err = stateMachine.updateGrub("", 2) asserter.AssertErrNil(err, true) restoreStdout() - readStdout, err := io.ReadAll(stdout) + readStdout, _ := io.ReadAll(stdout) expectedCmds := []*regexp.Regexp{ regexp.MustCompile("mount .*p2 .*/scratch/loopback"), @@ -1417,7 +1417,7 @@ func TestStateMachine_updateGrub_checkcmds(t *testing.T) { gotCmds := strings.Split(strings.TrimSpace(string(readStdout)), "\n") if len(expectedCmds) != len(gotCmds) { - t.Fatalf("%v commands to be executed, expected %v", len(gotCmds), len(expectedCmds)) + a t.Fatalf("%v commands to be executed, expected %v", len(gotCmds), len(expectedCmds)) } for i, gotCmd := range gotCmds {