diff --git a/Makefile b/Makefile index cdb34937..f31c9978 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,5 @@ # Image URL to use all building/pushing image targets -IMG ?= ${ACC}.dkr.ecr.eu-west-1.amazonaws.com/monzo/docker-images-dev:manager-$(shell git rev-parse --short head) -# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) -# CRD_OPTIONS ?= "crd:trivialVersions=true" +IMG ?= ${ACC}.dkr.ecr.eu-west-1.amazonaws.com/monzo/egress-operator:manager-$(shell git rev-parse --short head) # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -54,7 +52,7 @@ generate: controller-gen $(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths="./..." # Build the docker image -docker-build: #test +docker-build: test docker buildx build . -t ${IMG} --platform=linux/amd64 --provenance=false # Push the docker image diff --git a/controllers/configmap_test.go b/controllers/configmap_test.go index e3703df3..b9ac3815 100644 --- a/controllers/configmap_test.go +++ b/controllers/configmap_test.go @@ -1,9 +1,7 @@ package controllers import ( - bootstrap "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v3" "github.com/google/go-cmp/cmp" - "sigs.k8s.io/yaml" "testing" corev1 "k8s.io/api/core/v1" @@ -292,15 +290,11 @@ staticResources: for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { tt.args.es.Spec.EnvoyClusterMaxConnections = tt.args.maxConns - got, _ := envoyConfig(tt.args.es) - - var x bootstrap.Bootstrap - err := yaml.Unmarshal([]byte(got), &x) + got, err := envoyConfig(tt.args.es) if err != nil { - t.Error() + t.Error(err) } - if got, _ := envoyConfig(tt.args.es); got != tt.want { - + if got != tt.want { t.Errorf("envoyConfig() = %v, want %v", got, tt.want) t.Error(cmp.Diff(got, tt.want)) }