IT with aws client mock

This commit is contained in:
kkb0318
2024-04-09 21:40:09 +09:00
parent 0f3323b2fc
commit d99f64f148
7 changed files with 60 additions and 240 deletions
+2 -11
View File
@@ -64,7 +64,7 @@ GOLANGCI_LINT_VERSION ?= v1.57.2
.PHONY: all
all: fmt vet lint generate manifests kustomize helmify generate-docs mock
all: fmt vet lint generate manifests kustomize helmify generate-docs
##@ Development
@@ -72,10 +72,6 @@ all: fmt vet lint generate manifests kustomize helmify generate-docs mock
helm: manifests kustomize helmify
$(KUSTOMIZE) build config/release | $(HELMIFY) -crd-dir charts/irsa-manager
.PHONY: mock
mock: mockgen
mockgen -source internal/client/aws.go -destination internal/mock/aws_mock.go -package mock
.PHONY: manifests
@@ -96,7 +92,7 @@ vet: ## Run go vet against code.
.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -coverprofile cover.out
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
golangci-lint:
@@ -185,11 +181,6 @@ envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
.PHONY: mockgen
mockgen: $(MOCKGEN) ## Download envtest-setup locally if necessary.
$(MOCKGEN): $(LOCALBIN)
test -s $(LOCALBIN)/mockgen || GOBIN=$(LOCALBIN) go install go.uber.org/mock/mockgen@latest
.PHONY: helmify
helmify: $(HELMIFY) ## Download helmify locally if necessary.
$(HELMIFY): $(LOCALBIN)