Skip to content

Commit

Permalink
Merge pull request #163 from luthermonson/fix-e2e
Browse files Browse the repository at this point in the history
getting e2e tests working against LKE
  • Loading branch information
luthermonson authored Jan 9, 2024
2 parents 5103be6 + e783bbd commit 5572272
Show file tree
Hide file tree
Showing 8 changed files with 343 additions and 183 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
IMG ?= linode/linode-cloud-controller-manager:canary
RELEASE_DIR ?= release
GOLANGCI_LINT_IMG := golangci/golangci-lint:v1.55-alpine
PLATFORM ?= linux/amd64

export GO111MODULE=on

Expand Down Expand Up @@ -64,8 +65,9 @@ imgname:
echo IMG=${IMG}

.PHONY: docker-build
docker-build:
docker build --platform=linux/amd64 --tag=${IMG} .
# we cross compile the binary for linux, then build a container
docker-build: build-linux
DOCKER_BUILDKIT=1 docker build --platform=$(PLATFORM) --tag ${IMG} .

.PHONY: docker-push
# must run the docker build before pushing the image
Expand Down
4 changes: 2 additions & 2 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ endif
.PHONY: test reuse-and-test clean

${GINKGO_PATH}:
go install github.com/onsi/ginkgo/v2/ginkgo@v2.3.1
go install github.com/onsi/ginkgo/v2/ginkgo@v2.13.2

reuse-and-test: SUITE_ARGS='--reuse'

test reuse-and-test: ${GINKGO_PATH} check-token
go list -m; \
ginkgo -r --v --trace --cover $(TEST_ARGS) -- --v=3 --image=${IMG} $(SUITE_ARGS)
ginkgo -r --vv --trace $(TEST_ARGS) -- --image=${IMG} $(SUITE_ARGS)

clean: check-token
cd test; \
Expand Down
104 changes: 54 additions & 50 deletions e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,72 +1,76 @@
module e2e_test

go 1.17
go 1.20

require (
github.com/appscode/go v0.0.0-20200323182826-54e98e09185a
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/linode/linodego v0.21.1
github.com/onsi/ginkgo/v2 v2.3.1
github.com/onsi/gomega v1.22.0
k8s.io/api v0.19.2
k8s.io/apimachinery v0.19.2
k8s.io/client-go v0.19.2
github.com/linode/linodego v1.26.0
github.com/onsi/ginkgo/v2 v2.13.2
github.com/onsi/gomega v1.30.0
k8s.io/api v0.23.17
k8s.io/apimachinery v0.23.17
k8s.io/client-go v0.23.17
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v0.2.0 // indirect
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-resty/resty/v2 v2.9.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.4.1 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/json-iterator/go v1.1.10 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.5.1 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
google.golang.org/appengine v1.6.5 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.2.0 // indirect
k8s.io/utils v0.0.0-20201005171033-6301aaf42dc7 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

replace (
k8s.io/api => k8s.io/api v0.19.2
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.2
k8s.io/apimachinery => k8s.io/apimachinery v0.19.2
k8s.io/apiserver => k8s.io/apiserver v0.19.2
k8s.io/cli-runtime => k8s.io/cli-runtime v0.19.2
k8s.io/client-go => k8s.io/client-go v0.19.2
k8s.io/cloud-provider => k8s.io/cloud-provider v0.19.2
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.19.2
k8s.io/code-generator => k8s.io/code-generator v0.19.2
k8s.io/component-base => k8s.io/component-base v0.19.2
k8s.io/cri-api => k8s.io/cri-api v0.19.2
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.2
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.19.2
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.19.2
k8s.io/kube-proxy => k8s.io/kube-proxy v0.19.2
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.19.2
k8s.io/kubectl => k8s.io/kubectl v0.19.2
k8s.io/kubelet => k8s.io/kubelet v0.19.2
k8s.io/kubernetes => k8s.io/kubernetes v1.19.2
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.19.2
k8s.io/metrics => k8s.io/metrics v0.19.2
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.2
k8s.io/api => k8s.io/api v0.23.17
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.17
k8s.io/apimachinery => k8s.io/apimachinery v0.23.17
k8s.io/apiserver => k8s.io/apiserver v0.23.17
k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.17
k8s.io/client-go => k8s.io/client-go v0.23.17
k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.17
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.17
k8s.io/code-generator => k8s.io/code-generator v0.23.17
k8s.io/component-base => k8s.io/component-base v0.23.17
k8s.io/cri-api => k8s.io/cri-api v0.23.17
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.17
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.17
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.17
k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.17
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.17
k8s.io/kubectl => k8s.io/kubectl v0.23.17
k8s.io/kubelet => k8s.io/kubelet v0.23.17
k8s.io/kubernetes => k8s.io/kubernetes v0.23.17
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.17
k8s.io/metrics => k8s.io/metrics v0.23.17
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.17
)
Loading

0 comments on commit 5572272

Please sign in to comment.