CI: enable integration tests

This commit is contained in:
Jakub Kabza 2019-08-29 11:23:45 +02:00
parent cd78361bf7
commit 5b5a8f99cf
2 changed files with 7 additions and 2 deletions

View File

@ -13,7 +13,7 @@ test: generate fmt vet manifests
# Run integration tests on local KIND cluster
# TODO: modify once integration tests have been implemented
test-integration:
echo "no tests yet"
ginkgo -v ./controllers/...
# Build manager binary
manager: generate fmt vet

View File

@ -54,7 +54,7 @@ func main() {
var enableLeaderElection bool
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&hydraURL, "hydra-url", "http://ory-hydra-admin.kyma-system.svc.cluster.local", "The address of ORY Hydra")
flag.StringVar(&hydraURL, "hydra-url", "", "The address of ORY Hydra")
flag.IntVar(&port, "port", 4445, "Port ORY Hydra is listening on")
flag.StringVar(&endpoint, "endpoint", "/clients", "ORY Hydra's client endpoint")
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
@ -73,6 +73,11 @@ func main() {
os.Exit(1)
}
if hydraURL == "" {
setupLog.Error(fmt.Errorf("hydra service address can't be empty"), "unable to create controller", "controller", "OAuth2Client")
os.Exit(1)
}
u, err := url.Parse(fmt.Sprintf("%s:%d", hydraURL, port))
if err != nil {
setupLog.Error(err, "unable to parse ORY Hydra's URL", "controller", "OAuth2Client")