Documentation
¶
Index ¶
- Constants
- func RunScanAndAssertErrorMessage(terrascanBinaryPath string, exitCode, timeOut int, errString string, ...)
- func RunScanAndAssertGoldenOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isStdOut bool, ...)
- func RunScanAndAssertGoldenOutputRegex(terrascanBinaryPath, relGoldenFilePath string, exitCode int, ...)
- func RunScanAndAssertGoldenSarifOutputRegex(terrascanBinaryPath, relGoldenFilePath string, exitCode int, ...)
- func RunScanAndAssertJSONOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, ...)
- func RunScanAndAssertJSONOutputString(terrascanBinaryPath, goldenString string, exitCode int, isStdOut bool, ...)
- func RunScanAndAssertXMLOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, ...)
- func RunScanAndAssertYAMLOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, ...)
- func RunScanCommand(terrascanBinaryPath, relGoldenFilePath string, exitCode int, ...) (*gexec.Session, string)
Constants ¶
const ( // ScanCommand is terrascan's scan command ScanCommand string = "scan" // ScanTimeout is default scan command execution timeout ScanTimeout int = 3 // RemoteScanTimeout is default scan command remote execution timeout RemoteScanTimeout int = 30 )
Variables ¶
This section is empty.
Functions ¶
func RunScanAndAssertErrorMessage ¶
func RunScanAndAssertErrorMessage(terrascanBinaryPath string, exitCode, timeOut int, errString string, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertErrorMessage runs the scan command with supplied paramters and checks of error string is present
func RunScanAndAssertGoldenOutput ¶
func RunScanAndAssertGoldenOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isStdOut bool, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertGoldenOutput runs the scan command with supplied paramters and compares actual and golden output
func RunScanAndAssertGoldenOutputRegex ¶
func RunScanAndAssertGoldenOutputRegex(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertGoldenOutputRegex runs the scan command with supplied paramters and compares actual and golden output it replaces variable parts in output with regex eg: timestamp, file path
func RunScanAndAssertGoldenSarifOutputRegex ¶
func RunScanAndAssertGoldenSarifOutputRegex(terrascanBinaryPath, relGoldenFilePath string, exitCode int, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertGoldenSarifOutputRegex runs the scan command with supplied paramters and compares actual and golden output it replaces variable parts in output with regex eg: uri, version path
func RunScanAndAssertJSONOutput ¶
func RunScanAndAssertJSONOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertJSONOutput runs the scan command with supplied paramters and compares actual and golden output
func RunScanAndAssertJSONOutputString ¶
func RunScanAndAssertJSONOutputString(terrascanBinaryPath, goldenString string, exitCode int, isStdOut bool, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertJSONOutputString runs the scan command with supplied paramters and compares actual and golden output
func RunScanAndAssertXMLOutput ¶
func RunScanAndAssertXMLOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertXMLOutput runs the scan command with supplied paramters and compares actual and golden output
func RunScanAndAssertYAMLOutput ¶
func RunScanAndAssertYAMLOutput(terrascanBinaryPath, relGoldenFilePath string, exitCode int, isJunitXML, isStdOut bool, outWriter, errWriter io.Writer, args ...string)
RunScanAndAssertYAMLOutput runs the scan command with supplied paramters and compares actual and golden output
Types ¶
This section is empty.