From 75f5455e69349b69fce8d4196c037235ece15466 Mon Sep 17 00:00:00 2001 From: Moshe Immerman Date: Mon, 24 Feb 2025 19:25:11 +0200 Subject: [PATCH 1/4] chore: fix dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa044ab..60a5cf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.4@sha256:485362700179995808807601732516969044780959568521669549157f91742c AS builder +FROM golang:1.23.4 AS builder WORKDIR /app ARG VERSION From af03af30b9d893a798682c1daf12d750c2b559b8 Mon Sep 17 00:00:00 2001 From: Moshe Immerman Date: Mon, 24 Feb 2025 19:33:29 +0200 Subject: [PATCH 2/4] chore: fix test error --- pkg/consumer_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/consumer_test.go b/pkg/consumer_test.go index 4d91081..7105087 100644 --- a/pkg/consumer_test.go +++ b/pkg/consumer_test.go @@ -29,6 +29,7 @@ func TestSNSToSQSIntegration(t *testing.T) { // start testEnv restConfig, err := testEnv.Start() + Expect(err).To(BeNil()) defer testEnv.Stop() From a06c912f32fed7c1ad518dfa8b0e58d131ab1776 Mon Sep 17 00:00:00 2001 From: Moshe Immerman Date: Mon, 24 Feb 2025 19:58:40 +0200 Subject: [PATCH 3/4] chore: fix test --- .gitignore | 2 ++ Makefile | 23 +++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..70ca33a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.bin +batch-runner diff --git a/Makefile b/Makefile index aafd7b0..2bd5909 100644 --- a/Makefile +++ b/Makefile @@ -78,19 +78,18 @@ build: install: cp ./.bin/$(NAME) /usr/local/bin/ -test: envtest - go test -v ./... - -.bin/upx: .bin - wget -nv -O upx.tar.xz https://github.com/upx/upx/releases/download/v3.96/upx-3.96-$(ARCH)_$(OS).tar.xz - tar xf upx.tar.xz - mv upx-3.96-$(ARCH)_$(OS)/upx .bin - rm -rf upx-3.96-$(ARCH)_$(OS) +test: $(ENVTEST) + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -i --bin-dir $(LOCALBIN) -p path)" go test -v ./... +LOCALBIN = $(shell pwd)/.bin +ENVTEST ?= $(LOCALBIN)/setup-envtest ENVTEST_K8S_VERSION = 1.31.0 -ENVTEST_VERSION ?= release-0.19 -.PHONY: envtest -envtest: $(ENVTEST) ## Download setup-envtest locally if necessary. +ENVTEST_VERSION = release-0.19 + +.PHONY: $(LOCALBIN) +$(LOCALBIN): + mkdir -p $(LOCALBIN) + $(ENVTEST): $(LOCALBIN) - $(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,$(ENVTEST_VERSION)) + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest From b243f2d94680f9f3a7d46b710e969b0f2f2e809f Mon Sep 17 00:00:00 2001 From: Moshe Immerman Date: Mon, 24 Feb 2025 20:11:27 +0200 Subject: [PATCH 4/4] chore: fix test --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2bd5909..063b364 100644 --- a/Makefile +++ b/Makefile @@ -78,8 +78,6 @@ build: install: cp ./.bin/$(NAME) /usr/local/bin/ -test: $(ENVTEST) - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -i --bin-dir $(LOCALBIN) -p path)" go test -v ./... LOCALBIN = $(shell pwd)/.bin ENVTEST ?= $(LOCALBIN)/setup-envtest @@ -93,3 +91,5 @@ $(LOCALBIN): $(ENVTEST): $(LOCALBIN) test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest +test: $(ENVTEST) + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use --bin-dir $(LOCALBIN) -p path)" go test -v ./...