diff --git a/Makefile b/Makefile index 51f534871..d327403f5 100644 --- a/Makefile +++ b/Makefile @@ -27,20 +27,20 @@ GOVERSION := 1.10.0-alpine PULSAR := $(GOBUILDDIR)/bin/pulsar$(shell go env GOEXE) GOASSETSBUILDER := $(GOBUILDDIR)/bin/go-assets-builder$(shell go env GOEXE) -DOCKERFILE := Dockerfile +DOCKERFILE := Dockerfile DOCKERTESTFILE := Dockerfile.test DOCKERDURATIONTESTFILE := tests/duration/Dockerfile -ifndef LOCALONLY +ifndef LOCALONLY PUSHIMAGES := 1 IMAGESHA256 := true else IMAGESHA256 := false endif -ifdef IMAGETAG +ifdef IMAGETAG IMAGESUFFIX := :$(IMAGETAG) -else +else IMAGESUFFIX := :dev endif @@ -84,8 +84,8 @@ TESTBINNAME := $(PROJECT)_test TESTBIN := $(BINDIR)/$(TESTBINNAME) DURATIONTESTBINNAME := $(PROJECT)_duration_test DURATIONTESTBIN := $(BINDIR)/$(DURATIONTESTBINNAME) -RELEASE := $(GOBUILDDIR)/bin/release -GHRELEASE := $(GOBUILDDIR)/bin/github-release +RELEASE := $(GOBUILDDIR)/bin/release +GHRELEASE := $(GOBUILDDIR)/bin/github-release TESTLENGTHOPTIONS := -test.short TESTTIMEOUT := 20m @@ -94,7 +94,7 @@ ifeq ($(LONG), 1) TESTTIMEOUT := 180m endif ifdef VERBOSE - TESTVERBOSEOPTIONS := -v + TESTVERBOSEOPTIONS := -v endif SOURCES := $(shell find $(SRCDIR) -name '*.go' -not -path './test/*') @@ -176,7 +176,7 @@ update-vendor: # Manually restore arangosync vendor with: git checkout deps/github.com/arangodb/arangosync .PHONY: update-generated -update-generated: $(GOBUILDDIR) +update-generated: $(GOBUILDDIR) @docker build $(SRCDIR)/tools/codegen --build-arg GOVERSION=$(GOVERSION) -t k8s-codegen docker run \ --rm \ @@ -232,7 +232,7 @@ ifdef PUSHIMAGES docker push $(OPERATORIMAGE) endif -# Manifests +# Manifests .PHONY: manifests manifests: $(GOBUILDDIR) @@ -268,7 +268,7 @@ run-unit-tests: $(GOBUILDDIR) $(SOURCES) $(REPOPATH)/pkg/util/k8sutil \ $(REPOPATH)/pkg/util/k8sutil/test \ $(REPOPATH)/pkg/util/probe \ - $(REPOPATH)/pkg/util/validation + $(REPOPATH)/pkg/util/validation $(TESTBIN): $(GOBUILDDIR) $(SOURCES) @mkdir -p $(BINDIR) @@ -376,12 +376,12 @@ $(RELEASE): $(GOBUILDDIR) $(SOURCES) $(GHRELEASE) .PHONY: build-ghrelease build-ghrelease: $(GHRELEASE) -$(GHRELEASE): $(GOBUILDDIR) +$(GHRELEASE): $(GOBUILDDIR) GOPATH=$(GOBUILDDIR) go build -o $(GHRELEASE) github.com/aktau/github-release .PHONY: release-patch release-patch: $(RELEASE) - GOPATH=$(GOBUILDDIR) $(RELEASE) -type=patch + GOPATH=$(GOBUILDDIR) $(RELEASE) -type=patch .PHONY: release-minor release-minor: $(RELEASE) @@ -389,7 +389,7 @@ release-minor: $(RELEASE) .PHONY: release-major release-major: $(RELEASE) - GOPATH=$(GOBUILDDIR) $(RELEASE) -type=major + GOPATH=$(GOBUILDDIR) $(RELEASE) -type=major ## Kubernetes utilities @@ -410,4 +410,4 @@ redeploy-operator: delete-operator manifests kubectl apply -f $(MANIFESTPATHDEPLOYMENT) kubectl apply -f $(MANIFESTPATHDEPLOYMENTREPLICATION) kubectl apply -f $(MANIFESTPATHTEST) - kubectl get pods + kubectl get pods diff --git a/tests/load_balancer_test.go b/tests/load_balancer_test.go index 2aad8b1e2..c0542b093 100644 --- a/tests/load_balancer_test.go +++ b/tests/load_balancer_test.go @@ -84,9 +84,6 @@ func loadBalancingCursorSubtest(t *testing.T, useVst bool) { t.Fatalf("Deployment not running in time: %v", err) } - // check if the deployment got a load balancer, otherwise skip this test - isEaLoadBalancerOrSkip(depl.GetName(), t) - // Create a database client ctx := context.Background() clOpts := &DatabaseClientOptions{ diff --git a/tests/test_util.go b/tests/test_util.go index 7d593ecc7..99b647a64 100644 --- a/tests/test_util.go +++ b/tests/test_util.go @@ -155,21 +155,6 @@ func getEnterpriseImageOrSkip(t *testing.T) string { return image } -// isEaLoadBalancerOrSkip checks it the deployment -func isEaLoadBalancerOrSkip(deploymentName string, t *testing.T) { - kubecli := mustNewKubeClient(t) - ns := getNamespace(t) - eaServiceName := k8sutil.CreateDatabaseExternalAccessServiceName(deploymentName) - svcs := k8sutil.NewServiceCache(kubecli.CoreV1().Services(ns)) - if existing, err := svcs.Get(eaServiceName, metav1.GetOptions{}); err == nil { - if existing.Spec.Type == v1.ServiceTypeLoadBalancer { - return - } - } - - t.Skip("No load balancer deployed") -} - // shouldCleanDeployments returns true when deployments created // by tests should be removed, even when the test fails. func shouldCleanDeployments() bool {