package
1.12.0
Repository: https://github.com/hashicorp/packer.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
ExpectEmptyInput errors if the result from the pipeline was not empty Non-empty in this context means that the output contains characters that are non-whitespace, i.e.
ExpectNonEmptyInput errors if the result from the pipeline was empty Non-empty in this context means that the output contains characters that are non-whitespace, i.e.
No description provided by the author
No description provided by the author
Grep returns a checker that performs a regexp match on the command's output and returns an error if it failed Note: by default both streams will be checked by the grep.
No description provided by the author
No description provided by the author
IntCompare reads the input from the pipeline and compares it to a value using `op` If the input is not an int, this fails.
LineCount counts the number of lines received This excludes empty lines.
LineCountCheck builds a pipe checker to count the number of lines on stdout by default To change the stream(s) on which to perform the check, you can call SetStream on the returned pipe checker.
MkPipeCheck builds a new named PipeChecker Before it can be used, it will need a tester to be set, but this function is meant to make initialisation simpler.
No description provided by the author
No description provided by the author
No description provided by the author
PipeGrep performs a grep on an input and returns the matches, one-per-line.
PluginsUsed is a glorified `Grep` checker that looks for a bunch of plugins used from the logs of a packer build or packer validate.
Tee pipes the output to stdout (as t.Logf) and forwards it, unaltered This is useful typically for troubleshooting a pipe that misbehaves.

# Constants

BothStreams will use both stdout and stderr for performing a check.
No description provided by the author
No description provided by the author
Invert the check, i.e.
Only grep stderr.
Only grep stdout.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OnlySterr will only use stderr for performing a check.
OnlyStdout will only use stdout for performing a check.

# Structs

CustomCheck is meant to be a one-off checker with a user-provided function.
No description provided by the author
PipeChecker is a kind of checker that essentially lets users write mini gadgets that pipe inputs together, and compose those to end as a true/false statement, which translates to an error.
No description provided by the author

# Interfaces

Checker represents anything that can be used in conjunction with Assert.
Pipe is any command that allows piping two gadgets together There's always only one input and one output (stdout), mimicking essentially how pipes work in the UNIX-world.
Tester is the end of a pipe for testing purposes.

# Type aliases

CustomPipe allows providing a simple function for piping inputs together.
CustomTester allows providing a function to check that the input is what we want.
No description provided by the author
No description provided by the author
No description provided by the author