packer/packer_test/common/check
Lucas Bajolet 11c238b9eb packer_test: add FileGlob checker
When trying to validate that a particular file exists after a run of
Packer in a test suite, we can use the FileExists checker that we
provide as part of the gadgets we added for the acceptance test suites.

This approach works well, but only if we can extract a file name
reliably from the output of Packer core, or if we know what to look for
exactly beforehand. For other cases with a generated name however, the
FileExists checker is not enough, and therefore to accomodate for those
cases, we are introducing a new checker for this purpose: FileGlob.

FileGlob, as its name suggests, runs a glob expression on the
filesystem, and returns an error if no match was found regarding this
glob expression.
2024-12-16 13:49:03 -05:00
..
file_gadgets.go packer_test: add FileGlob checker 2024-12-16 13:49:03 -05:00
gadgets.go packer_test: rename/split lib into common/check 2024-09-11 16:08:51 -04:00
pipe_checker.go packer_test: rename/split lib into common/check 2024-09-11 16:08:51 -04:00