mirror of
https://github.com/hanzoai/gateway.git
synced 2026-10-30 15:04:44 +00:00
Drop the /v2 major version suffix from the Go module path. Internal imports, Makefile MODULE, and go.mod updated accordingly. External dependencies (krakend/*, luraproject/*) remain unchanged.
41 lines
575 B
Go
41 lines
575 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/hanzoai/gateway/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)
|
|
}
|