test(integration): initial version of integration tests manager

This commit is contained in:
Alexandre Pujol 2023-05-06 13:23:16 +01:00
parent 913ac3131c
commit 298360fff1
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
7 changed files with 575 additions and 2 deletions

View file

@ -21,7 +21,8 @@ const (
// Logging messages prefix
const (
bulletText = bold + " ⋅ " + reset
errorText = boldRed + " ✗ Error: " + reset
fatalText = boldRed + " ✗ Error: " + reset
errorText = boldRed + " ✗ " + reset
successText = boldGreen + " ✓ " + reset
warningText = boldYellow + " ‼ " + reset
)
@ -78,9 +79,14 @@ func Warning(msg string, a ...interface{}) int {
return Print(Warningf(msg, a...))
}
// Fatalf returns a formatted error message
func Error(msg string, a ...interface{}) int {
return Print(fmt.Sprintf("%s%s\n", errorText, fmt.Sprintf(msg, a...)))
}
// Fatalf returns a formatted error message
func Fatalf(msg string, a ...interface{}) string {
return fmt.Sprintf("%s%s\n", errorText, fmt.Sprintf(msg, a...))
return fmt.Sprintf("%s%s\n", fatalText, fmt.Sprintf(msg, a...))
}
// Fatal is equivalent to Print() followed by a call to os.Exit(1).