Files
2025-08-26 15:16:33 +00:00

41 lines
581 B
Go

package main
import (
"flag"
"fmt"
"os"
"github.com/krakend/krakend-ce/v2/tests"
)
func main() {
flag.Parse()
runner, tcs, err := tests.NewIntegration(nil, nil, nil)
if err != nil {
fmt.Println(err)
os.Exit(1)
return
}
errors := 0
for _, tc := range tcs {
if err := runner.Check(tc); err != nil {
errors++
fmt.Printf("%s: %s\n", tc.Name, err.Error())
continue
}
fmt.Printf("%s: ok\n", tc.Name)
}
fmt.Printf("%d test completed\n", len(tcs))
runner.Close()
if errors == 0 {
return
}
fmt.Printf("%d test failed\n", errors)
os.Exit(1)
}