tweak output formatting
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2024-01-10 09:40:31 +11:00
parent a31b01af4d
commit 509f687d6b
6 changed files with 126 additions and 11 deletions

View File

@@ -27,6 +27,7 @@ func main() {
// Process command line arguments
flag.StringVar(&inputJson, "input", "./tests.json", "Full path to input json test definition file")
flag.Parse()
// Read the json input file
if fileExists(inputJson) {
@@ -51,6 +52,7 @@ func main() {
}
RunTest(&testDefinitions.TestCases[i])
fmt.Printf("\nRunning checks on output\n")
success, err := CheckResults(&testDefinitions.TestCases[i])
if err != nil {
fmt.Printf("Error running test case : %s\n", err)
@@ -60,11 +62,13 @@ func main() {
fmt.Printf("Test result failed\n")
os.Exit(1)
} else {
fmt.Printf("Tests successful\n")
fmt.Printf("\nTest '%s' successful\n", testDefinitions.TestCases[i].Name)
}
}
fmt.Printf("\nCongratulations, all tests passed!\n\n")
// For debugging, just dump the output
//fmt.Printf("%+v\n", testDefinitions)
}