Skip to content

Commit 4a38840

Browse files
committed
test: Implemented e2e test framework
1 parent ceb2253 commit 4a38840

File tree

10 files changed

+1891
-1
lines changed

10 files changed

+1891
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ vet: ## Vet the code and dependencies
6464

6565
.PHONY: test
6666
test: ## Run tests.
67-
go test ./... -coverprofile coverage.out
67+
go test ./pkg/... -coverprofile coverage.out
6868

6969
.PHONY: toolchain
7070
toolchain: ## Install developer toolchain
@@ -86,3 +86,8 @@ docker-push: ## Push docker image with the manager.
8686
build-deploy: ## Create a deployment file that can be applied with `kubectl apply -f deploy.yaml`
8787
cd config/manager && kustomize edit set image controller=${ECRIMAGES}
8888
kustomize build config/default > deploy.yaml
89+
90+
## Run e2e tests against cluster pointed to by ~/.kube/config
91+
.PHONY: e2etest
92+
e2etest:
93+
cd test && go test -v ./... -count=1 --ginkgo.v

test/go.mod

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
module github.com/aws/aws-application-networking-k8s/test
2+
3+
go 1.20
4+
5+
replace (
6+
github.com/aws/aws-application-networking-k8s => ../
7+
github.com/aws/aws-sdk-go => ../scripts/aws_sdk_model_override/aws-sdk-go
8+
)
9+
10+
require (
11+
github.com/Pallinder/go-randomdata v1.2.0
12+
github.com/aws/aws-application-networking-k8s v0.3.0
13+
github.com/aws/aws-sdk-go v1.42.18
14+
github.com/imdario/mergo v0.3.13
15+
github.com/onsi/ginkgo/v2 v2.9.1
16+
github.com/onsi/gomega v1.27.3
17+
github.com/samber/lo v1.37.0
18+
go.uber.org/zap v1.24.0
19+
k8s.io/api v0.26.2
20+
k8s.io/apimachinery v0.26.2
21+
k8s.io/client-go v0.26.2
22+
sigs.k8s.io/controller-runtime v0.14.5
23+
sigs.k8s.io/gateway-api v0.4.0
24+
sigs.k8s.io/mcs-api v0.1.0
25+
)
26+
27+
require (
28+
github.com/benbjohnson/clock v1.1.0 // indirect
29+
github.com/beorn7/perks v1.0.1 // indirect
30+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
31+
github.com/davecgh/go-spew v1.1.1 // indirect
32+
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
33+
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
34+
github.com/fsnotify/fsnotify v1.6.0 // indirect
35+
github.com/go-logr/logr v1.2.3 // indirect
36+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
37+
github.com/go-openapi/jsonreference v0.20.0 // indirect
38+
github.com/go-openapi/swag v0.19.14 // indirect
39+
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
40+
github.com/gogo/protobuf v1.3.2 // indirect
41+
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
42+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
43+
github.com/golang/mock v1.5.0 // indirect
44+
github.com/golang/protobuf v1.5.3 // indirect
45+
github.com/google/gnostic v0.5.7-v3refs // indirect
46+
github.com/google/go-cmp v0.5.9 // indirect
47+
github.com/google/gofuzz v1.1.0 // indirect
48+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
49+
github.com/google/uuid v1.1.2 // indirect
50+
github.com/jmespath/go-jmespath v0.4.0 // indirect
51+
github.com/josharian/intern v1.0.0 // indirect
52+
github.com/json-iterator/go v1.1.12 // indirect
53+
github.com/mailru/easyjson v0.7.6 // indirect
54+
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
55+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
56+
github.com/modern-go/reflect2 v1.0.2 // indirect
57+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
58+
github.com/pkg/errors v0.9.1 // indirect
59+
github.com/prometheus/client_golang v1.14.0 // indirect
60+
github.com/prometheus/client_model v0.3.0 // indirect
61+
github.com/prometheus/common v0.37.0 // indirect
62+
github.com/prometheus/procfs v0.8.0 // indirect
63+
github.com/spf13/pflag v1.0.5 // indirect
64+
go.uber.org/atomic v1.7.0 // indirect
65+
go.uber.org/multierr v1.6.0 // indirect
66+
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
67+
golang.org/x/net v0.8.0 // indirect
68+
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
69+
golang.org/x/sys v0.6.0 // indirect
70+
golang.org/x/term v0.6.0 // indirect
71+
golang.org/x/text v0.8.0 // indirect
72+
golang.org/x/time v0.3.0 // indirect
73+
golang.org/x/tools v0.7.0 // indirect
74+
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
75+
google.golang.org/appengine v1.6.7 // indirect
76+
google.golang.org/protobuf v1.28.1 // indirect
77+
gopkg.in/inf.v0 v0.9.1 // indirect
78+
gopkg.in/yaml.v2 v2.4.0 // indirect
79+
gopkg.in/yaml.v3 v3.0.1 // indirect
80+
k8s.io/apiextensions-apiserver v0.26.1 // indirect
81+
k8s.io/component-base v0.26.1 // indirect
82+
k8s.io/klog/v2 v2.80.1 // indirect
83+
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
84+
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
85+
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
86+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
87+
sigs.k8s.io/yaml v1.3.0 // indirect
88+
)

0 commit comments

Comments
 (0)