packer_test: don't error on empty pipeline

If for some reason we only want to run a test on either stream without
doing some manipulation beforehand, we can run a PipeChecker, however
these would error if no pipe gadget was defined, preventing this
use-case.

Instead of errorring then, this commit just ignores if no pipe is
present, as none is required for the test to run.
pull/13032/head
Lucas Bajolet 2 years ago committed by Lucas Bajolet
parent 7943b8ce4e
commit 4e20956bae

@ -214,9 +214,6 @@ func (pc *PipeChecker) SetStream(s Stream) *PipeChecker {
}
func (pc PipeChecker) Check(stdout, stderr string, _ error) error {
if len(pc.pipers) == 0 {
return fmt.Errorf("%s - empty pipeline", pc.Name())
}
if pc.check == nil {
return fmt.Errorf("%s - missing tester", pc.Name())
}

Loading…
Cancel
Save