Skip to content

Commit eb91fef

Browse files
pengzhoumlPeng Zhou
andauthored
MKE-17358 E2E tests MakeFile and Infrastructure setup (#39)
* MKE-17358 E2E tests MakeFile and Infrastructure setup * refactor e2e tests * refactor utils * use env in makefile for e2e configuration --------- Co-authored-by: Peng Zhou <peng.zhou@progress.com>
1 parent 8b51be4 commit eb91fef

File tree

11 files changed

+588
-530
lines changed

11 files changed

+588
-530
lines changed

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ test: manifests generate fmt vet envtest ## Run tests.
118118
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
119119
.PHONY: e2e-test # Run the e2e tests against a Kind k8s instance that is spun up.
120120
e2e-test:
121-
go test -v ./test/e2e
121+
go test -v -count=1 ./test/e2e
122122

123123
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
124124
GOLANGCI_LINT_VERSION ?= v1.54.2
@@ -212,8 +212,15 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
212212
ENVTEST ?= $(LOCALBIN)/setup-envtest
213213

214214
## Tool Versions
215-
KUSTOMIZE_VERSION ?= v5.2.1
216-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
215+
KUSTOMIZE_VERSION ?= v5.5.0
216+
CONTROLLER_TOOLS_VERSION ?= v0.16.4
217+
218+
export E2E_DOCKER_IMAGE ?= $(IMG)
219+
export E2E_KUSTOMIZE_VERSION ?= $(KUSTOMIZE_VERSION)
220+
export E2E_CONTROLLER_TOOLS_VERSION ?= $(CONTROLLER_TOOLS_VERSION)
221+
export E2E_MARKLOGIC_IMAGE_VERSION ?= marklogicdb/marklogic-db:11.2.0-ubi-rootless
222+
export E2E_KUBERNETES_VERSION ?= v1.30.4
223+
217224

218225
.PHONY: kustomize
219226
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.

config/crd/bases/database.marklogic.com_marklogicclusters.yaml

Lines changed: 177 additions & 183 deletions
Large diffs are not rendered by default.

config/crd/bases/database.marklogic.com_marklogicgroups.yaml

Lines changed: 93 additions & 122 deletions
Large diffs are not rendered by default.

config/rbac/role.yaml

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,6 @@ kind: ClusterRole
44
metadata:
55
name: manager-role
66
rules:
7-
- apiGroups:
8-
- apps
9-
resources:
10-
- daemonsets
11-
- deployments
12-
- replicasets
13-
- statefulsets
14-
verbs:
15-
- create
16-
- delete
17-
- get
18-
- list
19-
- patch
20-
- update
21-
- watch
227
- apiGroups:
238
- ""
249
resources:
@@ -35,9 +20,12 @@ rules:
3520
- update
3621
- watch
3722
- apiGroups:
38-
- database.marklogic.com
23+
- apps
3924
resources:
40-
- marklogicclusters
25+
- daemonsets
26+
- deployments
27+
- replicasets
28+
- statefulsets
4129
verbs:
4230
- create
4331
- delete
@@ -49,20 +37,7 @@ rules:
4937
- apiGroups:
5038
- database.marklogic.com
5139
resources:
52-
- marklogicclusters/finalizers
53-
verbs:
54-
- update
55-
- apiGroups:
56-
- database.marklogic.com
57-
resources:
58-
- marklogicclusters/status
59-
verbs:
60-
- get
61-
- patch
62-
- update
63-
- apiGroups:
64-
- database.marklogic.com
65-
resources:
40+
- marklogicclusters
6641
- marklogicgroups
6742
verbs:
6843
- create
@@ -75,12 +50,14 @@ rules:
7550
- apiGroups:
7651
- database.marklogic.com
7752
resources:
53+
- marklogicclusters/finalizers
7854
- marklogicgroups/finalizers
7955
verbs:
8056
- update
8157
- apiGroups:
8258
- database.marklogic.com
8359
resources:
60+
- marklogicclusters/status
8461
- marklogicgroups/status
8562
verbs:
8663
- get

go.mod

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,82 @@
11
module github.com/marklogic/marklogic-kubernetes-operator
22

3-
go 1.22.6
3+
go 1.22.8
44

55
require (
66
github.com/cisco-open/k8s-objectmatcher v1.10.0
7-
github.com/go-logr/logr v1.4.1
8-
github.com/onsi/ginkgo/v2 v2.17.1
9-
github.com/onsi/gomega v1.32.0
10-
k8s.io/api v0.30.1
11-
k8s.io/apiextensions-apiserver v0.30.0
12-
k8s.io/apimachinery v0.30.1
13-
k8s.io/client-go v0.30.1
14-
sigs.k8s.io/controller-runtime v0.18.2
15-
sigs.k8s.io/e2e-framework v0.4.0
7+
github.com/go-logr/logr v1.4.2
8+
github.com/onsi/ginkgo/v2 v2.19.0
9+
github.com/onsi/gomega v1.33.1
10+
k8s.io/api v0.31.1
11+
k8s.io/apiextensions-apiserver v0.31.0
12+
k8s.io/apimachinery v0.31.1
13+
k8s.io/client-go v0.31.1
14+
sigs.k8s.io/controller-runtime v0.19.0
15+
sigs.k8s.io/e2e-framework v0.5.0
1616
)
1717

1818
require (
1919
emperror.dev/errors v0.8.1 // indirect
2020
github.com/beorn7/perks v1.0.1 // indirect
2121
github.com/blang/semver/v4 v4.0.0 // indirect
22-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
23-
github.com/davecgh/go-spew v1.1.1 // indirect
22+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
23+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2424
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
2525
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
2626
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
2727
github.com/fsnotify/fsnotify v1.7.0 // indirect
28+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
2829
github.com/go-logr/zapr v1.3.0 // indirect
2930
github.com/go-openapi/jsonpointer v0.19.6 // indirect
3031
github.com/go-openapi/jsonreference v0.20.2 // indirect
31-
github.com/go-openapi/swag v0.22.3 // indirect
32-
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
32+
github.com/go-openapi/swag v0.22.4 // indirect
33+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
3334
github.com/gogo/protobuf v1.3.2 // indirect
3435
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3536
github.com/golang/protobuf v1.5.4 // indirect
3637
github.com/google/gnostic-models v0.6.8 // indirect
3738
github.com/google/go-cmp v0.6.0 // indirect
3839
github.com/google/gofuzz v1.2.0 // indirect
39-
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
40-
github.com/google/uuid v1.3.0 // indirect
40+
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
41+
github.com/google/uuid v1.6.0 // indirect
4142
github.com/gorilla/websocket v1.5.0 // indirect
4243
github.com/imdario/mergo v0.3.15 // indirect
4344
github.com/josharian/intern v1.0.0 // indirect
4445
github.com/json-iterator/go v1.1.12 // indirect
4546
github.com/mailru/easyjson v0.7.7 // indirect
46-
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
47-
github.com/moby/spdystream v0.2.0 // indirect
47+
github.com/moby/spdystream v0.4.0 // indirect
4848
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4949
github.com/modern-go/reflect2 v1.0.2 // indirect
5050
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5151
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
5252
github.com/pkg/errors v0.9.1 // indirect
53-
github.com/prometheus/client_golang v1.18.0 // indirect
54-
github.com/prometheus/client_model v0.5.0 // indirect
55-
github.com/prometheus/common v0.45.0 // indirect
56-
github.com/prometheus/procfs v0.12.0 // indirect
53+
github.com/prometheus/client_golang v1.19.1 // indirect
54+
github.com/prometheus/client_model v0.6.1 // indirect
55+
github.com/prometheus/common v0.55.0 // indirect
56+
github.com/prometheus/procfs v0.15.1 // indirect
5757
github.com/spf13/pflag v1.0.5 // indirect
58-
github.com/vladimirvivien/gexe v0.2.0 // indirect
58+
github.com/vladimirvivien/gexe v0.3.0 // indirect
59+
github.com/x448/float16 v0.8.4 // indirect
5960
go.uber.org/multierr v1.11.0 // indirect
6061
go.uber.org/zap v1.26.0 // indirect
61-
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
62-
golang.org/x/net v0.23.0 // indirect
63-
golang.org/x/oauth2 v0.12.0 // indirect
64-
golang.org/x/sys v0.18.0 // indirect
65-
golang.org/x/term v0.18.0 // indirect
66-
golang.org/x/text v0.14.0 // indirect
62+
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
63+
golang.org/x/net v0.26.0 // indirect
64+
golang.org/x/oauth2 v0.21.0 // indirect
65+
golang.org/x/sys v0.21.0 // indirect
66+
golang.org/x/term v0.21.0 // indirect
67+
golang.org/x/text v0.16.0 // indirect
6768
golang.org/x/time v0.3.0 // indirect
68-
golang.org/x/tools v0.18.0 // indirect
69+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
6970
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
70-
google.golang.org/appengine v1.6.7 // indirect
71-
google.golang.org/protobuf v1.33.0 // indirect
71+
google.golang.org/protobuf v1.34.2 // indirect
72+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7273
gopkg.in/inf.v0 v0.9.1 // indirect
7374
gopkg.in/yaml.v2 v2.4.0 // indirect
7475
gopkg.in/yaml.v3 v3.0.1 // indirect
75-
k8s.io/component-base v0.30.1 // indirect
76-
k8s.io/klog/v2 v2.120.1 // indirect
76+
k8s.io/component-base v0.31.1 // indirect
77+
k8s.io/klog/v2 v2.130.1 // indirect
7778
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
78-
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
79+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
7980
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
8081
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
8182
sigs.k8s.io/yaml v1.4.0 // indirect

0 commit comments

Comments
 (0)