Move compose e2e tests into pkg

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2021-06-25 17:08:40 +02:00
parent d20c3b0e22
commit fb73dd58d9
54 changed files with 410 additions and 330 deletions

View file

@ -28,6 +28,9 @@ import (
cliConfig "github.com/docker/cli/cli/config"
)
// ScanSuggestMsg display a message after a successful build to suggest use of `docker scan` command
const ScanSuggestMsg = "Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them"
// DisplayScanSuggestMsg displlay a message suggesting users can scan new image
func DisplayScanSuggestMsg() {
if os.Getenv("DOCKER_SCAN_SUGGEST") == "false" {
@ -39,7 +42,7 @@ func DisplayScanSuggestMsg() {
if scanAlreadyInvoked() {
return
}
fmt.Fprintf(os.Stderr, "\nUse 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them\n")
fmt.Fprintf(os.Stderr, "\n"+ScanSuggestMsg+"\n")
}
func scanAlreadyInvoked() bool {