This is not perfect because they are called from files like
cmd/safcm-remote/sync/commands.go which is not very helpful to figure
out which test case failed. However, it's better than showing
cmd/safcm-remote/sync/sync_test.go which was the previous behavior.
return resErr
}
func (r *testRunner) CombinedOutput(cmd *exec.Cmd) ([]byte, error) {
+ r.t.Helper()
+
stdout, stderr, err := r.check("combinedOutput", cmd)
if stderr != nil {
// stdout also contains stderr
}
func (r *testRunner) check(method string, cmd *exec.Cmd) (
[]byte, []byte, error) {
+ r.t.Helper()
if len(r.expCmds) == 0 {
r.t.Fatalf("%s: empty expCmds", method)
}
func (s *syncTestResult) Wait() []string {
+ s.runner.t.Helper()
+
close(s.ch)
s.wg.Wait()