From 4e20956baed06e3a345b7e4e23b52d4665bf1228 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 15 May 2024 15:06:08 -0400 Subject: [PATCH] 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. --- packer_test/pipe_checker_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/packer_test/pipe_checker_test.go b/packer_test/pipe_checker_test.go index 2e395bff0..b3b415349 100644 --- a/packer_test/pipe_checker_test.go +++ b/packer_test/pipe_checker_test.go @@ -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()) }