Skip to content

Commit 69f7c50

Browse files
committed
add httest installation to the Makefile
On-behalf-of: @SAP [email protected]
1 parent ce2ea4a commit 69f7c50

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ GOLANGCI_LINT_VER := v1.62.2
5959
GOLANGCI_LINT_BIN := golangci-lint
6060
GOLANGCI_LINT := $(TOOLS_GOBIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
6161

62+
HTTEST_VER := v0.3.1
63+
HTTEST_BIN := httest
64+
HTTEST := $(TOOLS_GOBIN_DIR)/$(HTTEST_BIN)-$(HTTEST_VER)
65+
6266
GOTESTSUM_VER := v1.8.1
6367
GOTESTSUM_BIN := gotestsum
6468
GOTESTSUM := $(abspath $(TOOLS_DIR))/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER)
@@ -136,6 +140,9 @@ install: require-jq require-go require-git verify-go-versions ## Install the pro
136140
$(GOLANGCI_LINT):
137141
GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/golangci/golangci-lint/cmd/golangci-lint $(GOLANGCI_LINT_BIN) $(GOLANGCI_LINT_VER)
138142

143+
$(HTTEST):
144+
GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) go.xrstf.de/httest $(HTTEST_BIN) $(HTTEST_VER)
145+
139146
$(LOGCHECK):
140147
GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) sigs.k8s.io/logtools/logcheck $(LOGCHECK_BIN) $(LOGCHECK_VER)
141148

@@ -183,7 +190,7 @@ vendor: ## Vendor the dependencies
183190
go mod vendor
184191
.PHONY: vendor
185192

186-
tools: $(GOLANGCI_LINT) $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) $(YAML_PATCH) $(GOTESTSUM) $(OPENSHIFT_GOIMPORTS) $(CODE_GENERATOR) ## Install tools
193+
tools: $(GOLANGCI_LINT) $(HTTEST) $(CONTROLLER_GEN) $(KCP_APIGEN_GEN) $(YAML_PATCH) $(GOTESTSUM) $(OPENSHIFT_GOIMPORTS) $(CODE_GENERATOR) ## Install tools
187194
.PHONY: tools
188195

189196
$(CONTROLLER_GEN):
@@ -269,6 +276,7 @@ endif
269276
ifdef USE_GOTESTSUM
270277
test-e2e: $(GOTESTSUM)
271278
endif
279+
test-e2e: $(HTTEST)
272280
test-e2e: TEST_ARGS ?=
273281
test-e2e: WHAT ?= ./test/e2e...
274282
test-e2e: build-all ## Run e2e tests
@@ -280,6 +288,7 @@ test-e2e: build-all ## Run e2e tests
280288
ifdef USE_GOTESTSUM
281289
test-e2e-shared-minimal: $(GOTESTSUM)
282290
endif
291+
test-e2e-shared-minimal: $(HTTEST)
283292
test-e2e-shared-minimal: TEST_ARGS ?=
284293
test-e2e-shared-minimal: WHAT ?= ./test/e2e...
285294
test-e2e-shared-minimal: WORK_DIR ?= .
@@ -305,6 +314,7 @@ test-e2e-shared-minimal: build-all
305314
ifdef USE_GOTESTSUM
306315
test-e2e-sharded-minimal: $(GOTESTSUM)
307316
endif
317+
test-e2e-sharded-minimal: $(HTTEST)
308318
test-e2e-sharded-minimal: TEST_ARGS ?=
309319
test-e2e-sharded-minimal: WHAT ?= ./test/e2e...
310320
test-e2e-sharded-minimal: WORK_DIR ?= .

0 commit comments

Comments
 (0)