Skip to content

Commit 0a252a1

Browse files
authored
Merge pull request #7 from jaypipes/go-mod-local
allow local testing of s3 controller
2 parents b4310ee + afcedba commit 0a252a1

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/docs/site
66
bin
77
build
8+
go.local.sum

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ GO_LDFLAGS=-ldflags "-X main.version=$(VERSION) \
1111
-X main.buildHash=$(GITCOMMIT) \
1212
-X main.buildDate=$(BUILDDATE)"
1313

14-
.PHONY: all test
14+
.PHONY: all test local-test
1515

1616
all: test
1717

1818
test: ## Run code tests
1919
go test -v ./...
2020

21+
local-test: ## Run code tests using go.local.mod file
22+
go test -modfile=go.local.mod -v ./...
23+
2124
help: ## Show this help.
2225
@grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v grep | sed -e 's/\\$$//' \
2326
| awk -F'[:#]' '{print $$1 = sprintf("%-30s", $$1), $$4}'

go.local.mod

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module github.com/aws-controllers-k8s/s3-controller
2+
3+
go 1.14
4+
5+
replace github.com/aws-controllers-k8s/runtime => ../runtime
6+
7+
require (
8+
github.com/aws-controllers-k8s/runtime v0.0.4
9+
github.com/aws/aws-sdk-go v1.37.4
10+
github.com/go-logr/logr v0.1.0
11+
github.com/google/go-cmp v0.3.1
12+
github.com/spf13/pflag v1.0.5
13+
k8s.io/api v0.18.2
14+
k8s.io/apimachinery v0.18.6
15+
k8s.io/client-go v0.18.2
16+
sigs.k8s.io/controller-runtime v0.6.0
17+
)

0 commit comments

Comments
 (0)