Skip to content

Commit cd1dae6

Browse files
authored
Use Coherence resource generation instead of calculating a hash (#724)
1 parent 8cf4d8b commit cd1dae6

22 files changed

+501
-440
lines changed

.github/workflows/compatibility-tests.yaml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 2019, 2025, Oracle Corporation and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at
33
# http://oss.oracle.com/licenses/upl.
44

@@ -37,6 +37,7 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
compatibilityVersion:
40+
- 3.4.3
4041
- 3.4.2
4142
- 3.4.1
4243
- 3.4.0
@@ -45,10 +46,11 @@ jobs:
4546
- 3.3.3
4647
- 3.3.2
4748
- 3.3.1
48-
- 3.3.0
49-
- 3.2.11
50-
- 3.2.10
5149
include:
50+
- compatibilityVersion: 3.4.3
51+
coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-1"
52+
compatibilitySelector: control-plane=coherence
53+
k8s: kindest/node:v1.32.2@sha256:f226345927d7e348497136874b6d207e0b32cc52154ad8323129352923a3142f
5254
- compatibilityVersion: 3.4.2
5355
coherence-image: "ghcr.io/oracle/coherence-ce:14.1.2-0-1"
5456
compatibilitySelector: control-plane=coherence
@@ -81,18 +83,6 @@ jobs:
8183
coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10"
8284
compatibilitySelector: control-plane=coherence
8385
k8s: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
84-
- compatibilityVersion: 3.3.0
85-
coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10"
86-
compatibilitySelector: control-plane=coherence
87-
k8s: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
88-
- compatibilityVersion: 3.2.11
89-
coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10"
90-
compatibilitySelector: control-plane=coherence
91-
k8s: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
92-
- compatibilityVersion: 3.2.10
93-
coherence-image: "ghcr.io/oracle/coherence-ce:22.06.10"
94-
compatibilitySelector: control-plane=coherence
95-
k8s: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
9686

9787
steps:
9888
- uses: actions/checkout@v4

Makefile

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -771,17 +771,19 @@ manifests: $(BUILD_TARGETS)/manifests ## Generate the CustomResourceDefinition a
771771
$(BUILD_TARGETS)/manifests: $(BUILD_PROPS) config/crd/bases/coherence.oracle.com_coherence.yaml docs/about/04_coherence_spec.adoc $(MANIFEST_FILES) $(BUILD_MANIFESTS_PKG)
772772
touch $(BUILD_TARGETS)/manifests
773773

774-
config/crd/bases/coherence.oracle.com_coherence.yaml: $(TOOLS_BIN)/kustomize $(API_GO_FILES) $(TOOLS_BIN)/controller-gen
774+
config/crd/bases/coherence.oracle.com_coherence.yaml: $(TOOLS_BIN)/kustomize $(API_GO_FILES) $(TOOLS_BIN)/controller-gen get-yq
775775
$(CONTROLLER_GEN) "crd:crdVersions={v1}" \
776776
rbac:roleName=manager-role paths="{./api/...,./controllers/...}" \
777777
output:crd:dir=config/crd/bases
778778
cp -R config/crd/ config/crd-small
779779
$(CONTROLLER_GEN) "crd:crdVersions={v1},maxDescLen=0" \
780780
rbac:roleName=manager-role paths="{./api/...,./controllers/...}" \
781781
output:crd:dir=config/crd-small/bases
782-
cd config/crd && $(KUSTOMIZE) edit add label "app.kubernetes.io/version:$(VERSION)" -f
783-
$(KUSTOMIZE) build config/crd -o $(BUILD_ASSETS)/
784-
cd config/crd-small && $(KUSTOMIZE) edit add label "app.kubernetes.io/version:$(VERSION)" -f
782+
$(YQ) eval -i '.metadata.labels["app.kubernetes.io/version"] = "$(VERSION)"' config/crd/bases/coherence.oracle.com_coherence.yaml
783+
$(YQ) eval -i '.metadata.labels["app.kubernetes.io/version"] = "$(VERSION)"' config/crd/bases/coherence.oracle.com_coherencejob.yaml
784+
$(YQ) eval -i '.metadata.labels["app.kubernetes.io/version"] = "$(VERSION)"' config/crd-small/bases/coherence.oracle.com_coherence.yaml
785+
$(YQ) eval -i '.metadata.labels["app.kubernetes.io/version"] = "$(VERSION)"' config/crd-small/bases/coherence.oracle.com_coherencejob.yaml
786+
$(KUSTOMIZE) build config/crd-small -o $(BUILD_ASSETS)/
785787

786788
# ----------------------------------------------------------------------------------------------------------------------
787789
# Generate the config.json file used by the Operator for default configuration values
@@ -1228,7 +1230,7 @@ oc-login:
12281230
test-operator: export CGO_ENABLED = 0
12291231
test-operator: export COHERENCE_IMAGE := $(COHERENCE_IMAGE)
12301232
test-operator: export OPERATOR_IMAGE := $(OPERATOR_IMAGE)
1231-
test-operator: $(BUILD_PROPS) $(BUILD_TARGETS)/manifests $(BUILD_TARGETS)/generate gotestsum ## Run the Operator unit tests
1233+
test-operator: $(BUILD_PROPS) $(BUILD_TARGETS)/manifests $(BUILD_TARGETS)/generate install-crds gotestsum ## Run the Operator unit tests
12321234
@echo "Running operator tests"
12331235
$(GOTESTSUM) --format standard-verbose --junitfile $(TEST_LOGS_DIR)/operator-test.xml \
12341236
-- $(GO_TEST_FLAGS) -v ./api/... ./controllers/... ./pkg/...
@@ -1393,7 +1395,7 @@ e2e-k3d-test: export MVN_VERSION := $(MVN_VERSION)
13931395
e2e-k3d-test: export OPERATOR_IMAGE := $(OPERATOR_IMAGE)
13941396
e2e-k3d-test: export COHERENCE_IMAGE := $(COHERENCE_IMAGE)
13951397
e2e-k3d-test: export SKIP_SPRING_CNBP := $(SKIP_SPRING_CNBP)
1396-
e2e-k3d-test: reset-namespace create-ssl-secrets gotestsum undeploy ## Run the Operator end-to-end 'local' functional tests using a local Operator instance
1398+
e2e-k3d-test: reset-namespace create-ssl-secrets gotestsum undeploy install-crds ensure-pull-secret ## Run the Operator end-to-end 'local' functional tests using a local Operator instance
13971399
$(GOTESTSUM) --format standard-verbose --junitfile $(TEST_LOGS_DIR)/operator-e2e-k3d-test.xml \
13981400
-- $(GO_TEST_FLAGS_E2E) ./test/e2e/large-cluster/...
13991401

@@ -1416,7 +1418,7 @@ e2e-client-test: export VERSION := $(VERSION)
14161418
e2e-client-test: export MVN_VERSION := $(MVN_VERSION)
14171419
e2e-client-test: export OPERATOR_IMAGE := $(OPERATOR_IMAGE)
14181420
e2e-client-test: export COHERENCE_IMAGE := $(COHERENCE_IMAGE)
1419-
e2e-client-test: build-client-image reset-namespace create-ssl-secrets gotestsum undeploy ## Run the end-to-end Coherence client tests using a local Operator deployment
1421+
e2e-client-test: build-client-image reset-namespace create-ssl-secrets gotestsum undeploy install-crds ensure-pull-secret ## Run the end-to-end Coherence client tests using a local Operator deployment
14201422
$(GOTESTSUM) --format standard-verbose --junitfile $(TEST_LOGS_DIR)/operator-e2e-client-test.xml \
14211423
-- $(GO_TEST_FLAGS_E2E) ./test/e2e/clients/...
14221424

@@ -1432,7 +1434,7 @@ e2e-helm-test: export COHERENCE_IMAGE_REGISTRY := $(COHERENCE_IMAGE_REGISTRY)
14321434
e2e-helm-test: export COHERENCE_IMAGE_NAME := $(COHERENCE_IMAGE_NAME)
14331435
e2e-helm-test: export COHERENCE_IMAGE_TAG := $(COHERENCE_IMAGE_TAG)
14341436
e2e-helm-test: export COHERENCE_IMAGE := $(COHERENCE_IMAGE)
1435-
e2e-helm-test: $(BUILD_PROPS) $(BUILD_HELM)/coherence-operator-$(VERSION).tgz reset-namespace gotestsum ## Run the Operator Helm chart end-to-end functional tests
1437+
e2e-helm-test: $(BUILD_PROPS) $(BUILD_HELM)/coherence-operator-$(VERSION).tgz uninstall-crds reset-namespace gotestsum ## Run the Operator Helm chart end-to-end functional tests
14361438
$(GOTESTSUM) --format standard-verbose --junitfile $(TEST_LOGS_DIR)/operator-e2e-helm-test.xml \
14371439
-- $(GO_TEST_FLAGS_E2E) ./test/e2e/helm/...
14381440

@@ -1449,7 +1451,7 @@ e2e-helm-test: $(BUILD_PROPS) $(BUILD_HELM)/coherence-operator-$(VERSION).tgz re
14491451
# ----------------------------------------------------------------------------------------------------------------------
14501452
.PHONY: e2e-prometheus-test
14511453
e2e-prometheus-test: export MF = $(MAKEFLAGS)
1452-
e2e-prometheus-test: reset-namespace install-prometheus create-ssl-secrets deploy-and-wait ## Run the Operator metrics/Prometheus end-to-end functional tests
1454+
e2e-prometheus-test: reset-namespace install-prometheus create-ssl-secrets ensure-pull-secret deploy-and-wait ## Run the Operator metrics/Prometheus end-to-end functional tests
14531455
$(MAKE) run-prometheus-test $${MF} \
14541456
; rc=$$? \
14551457
; $(MAKE) uninstall-prometheus $${MF} \
@@ -1491,7 +1493,7 @@ run-prometheus-test: gotestsum
14911493
# These tests will use whichever k8s cluster the local environment is pointing to.
14921494
# ----------------------------------------------------------------------------------------------------------------------
14931495
.PHONY: compatibility-test
1494-
compatibility-test: undeploy build-all-images $(BUILD_HELM)/coherence-operator-$(VERSION).tgz undeploy clean-namespace reset-namespace gotestsum just-compatibility-test ## Run the Operator backwards compatibility tests
1496+
compatibility-test: undeploy build-all-images helm-chart undeploy clean-namespace reset-namespace ensure-pull-secret gotestsum just-compatibility-test ## Run the Operator backwards compatibility tests
14951497

14961498
.PHONY: just-compatibility-test
14971499
just-compatibility-test: export CGO_ENABLED = 0
@@ -1547,7 +1549,7 @@ certification-test: install-certification ## Run the Operator Kubernetes ver
15471549
# Install the Operator prior to running compatibility tests.
15481550
# ----------------------------------------------------------------------------------------------------------------------
15491551
.PHONY: install-certification
1550-
install-certification: $(BUILD_TARGETS)/build-operator prepare-network-policies reset-namespace create-ssl-secrets deploy-and-wait
1552+
install-certification: $(BUILD_TARGETS)/build-operator prepare-network-policies reset-namespace create-ssl-secrets ensure-pull-secret deploy-and-wait
15511553

15521554
# ----------------------------------------------------------------------------------------------------------------------
15531555
# Executes the Go end-to-end Operator certification tests.
@@ -1745,8 +1747,8 @@ cleanup-coherence-compatibility: undeploy uninstall-crds clean-namespace
17451747
# configured to use.
17461748
# ----------------------------------------------------------------------------------------------------------------------
17471749
.PHONY: install-crds
1748-
install-crds: prepare-deploy uninstall-crds ## Install the CRDs
1749-
$(KUSTOMIZE) build $(BUILD_DEPLOY)/crd | $(KUBECTL_CMD) create -f -
1750+
install-crds: prepare-deploy ## Install the CRDs
1751+
$(KUSTOMIZE) build $(BUILD_DEPLOY)/crd-small | $(KUBECTL_CMD) apply -f -
17501752

17511753
# ----------------------------------------------------------------------------------------------------------------------
17521754
# Uninstall CRDs from Kubernetes.
@@ -1761,6 +1763,22 @@ uninstall-crds: $(BUILD_TARGETS)/manifests ## Uninstall the CRDs
17611763
$(KUSTOMIZE) build $(BUILD_DEPLOY)/crd | $(KUBECTL_CMD) delete --force -f - || true
17621764
@echo "Uninstall CRDs completed"
17631765

1766+
1767+
.PHONY: helm-patch-crd
1768+
helm-patch-crd:
1769+
$(KUBECTL_CMD) patch customresourcedefinition coherence.coherence.oracle.com \
1770+
--patch '{"metadata": {"labels": {"app.kubernetes.io/managed-by": "Helm"}}}'
1771+
$(KUBECTL_CMD) patch customresourcedefinition coherence.coherence.oracle.com \
1772+
--patch '{"metadata": {"annotations": {"meta.helm.sh/release-name": "operator"}}}'
1773+
$(KUBECTL_CMD) patch customresourcedefinition coherence.coherence.oracle.com \
1774+
--patch '{"metadata": {"annotations": {"meta.helm.sh/release-namespace": "operator-test"}}}'
1775+
$(KUBECTL_CMD) patch customresourcedefinition coherencejob.coherence.oracle.com \
1776+
--patch '{"metadata": {"labels": {"app.kubernetes.io/managed-by": "Helm"}}}'
1777+
$(KUBECTL_CMD) patch customresourcedefinition coherencejob.coherence.oracle.com \
1778+
--patch '{"metadata": {"annotations": {"meta.helm.sh/release-name": "operator"}}}'
1779+
$(KUBECTL_CMD) patch customresourcedefinition coherencejob.coherence.oracle.com \
1780+
--patch '{"metadata": {"annotations": {"meta.helm.sh/release-namespace": "operator-test"}}}'
1781+
17641782
# ----------------------------------------------------------------------------------------------------------------------
17651783
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
17661784
# ----------------------------------------------------------------------------------------------------------------------
@@ -1902,19 +1920,21 @@ endef
19021920
# Un-deploy controller from the configured Kubernetes cluster in ~/.kube/config
19031921
# ----------------------------------------------------------------------------------------------------------------------
19041922
.PHONY: undeploy
1905-
undeploy: $(BUILD_PROPS) $(BUILD_TARGETS)/manifests $(TOOLS_BIN)/kustomize ## Undeploy the Coherence Operator
1923+
undeploy: $(BUILD_PROPS) $(BUILD_TARGETS)/manifests $(TOOLS_BIN)/kustomize uninstall-webhooks ## Undeploy the Coherence Operator
19061924
@echo "Undeploy Coherence Operator..."
19071925
$(call prepare_deploy,$(OPERATOR_IMAGE),$(OPERATOR_NAMESPACE))
19081926
$(KUSTOMIZE) build $(BUILD_DEPLOY)/default | $(KUBECTL_CMD) delete -f - || true
1909-
$(KUBECTL_CMD) -n $(OPERATOR_NAMESPACE) delete secret coherence-webhook-server-cert || true
1910-
$(KUBECTL_CMD) delete mutatingwebhookconfiguration coherence-operator-mutating-webhook-configuration || true
1911-
$(KUBECTL_CMD) delete validatingwebhookconfiguration coherence-operator-validating-webhook-configuration || true
19121927
$(KUBECTL_CMD) -n $(OPERATOR_NAMESPACE) delete secret coherence-operator-pull-secret || true
19131928
@echo "Undeploy Coherence Operator completed"
19141929
@echo "Uninstalling CRDs - executing deletion"
19151930
$(KUSTOMIZE) build $(BUILD_DEPLOY)/crd | $(KUBECTL_CMD) delete --force -f - || true
19161931
@echo "Uninstall CRDs completed"
19171932

1933+
.PHONY: uninstall-webhooks
1934+
uninstall-webhooks:
1935+
$(KUBECTL_CMD) -n $(OPERATOR_NAMESPACE) delete secret coherence-webhook-server-cert || true
1936+
$(KUBECTL_CMD) delete mutatingwebhookconfiguration coherence-operator-mutating-webhook-configuration || true
1937+
$(KUBECTL_CMD) delete validatingwebhookconfiguration coherence-operator-validating-webhook-configuration || true
19181938

19191939
# ----------------------------------------------------------------------------------------------------------------------
19201940
# Tail the deployed operator logs.
@@ -2087,7 +2107,7 @@ create-ssl-secrets: $(BUILD_OUTPUT)/certs
20872107
##@ KinD
20882108

20892109
KIND_CLUSTER ?= operator
2090-
KIND_IMAGE ?= "kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027"
2110+
KIND_IMAGE ?= "kindest/node:v1.32.2@sha256:f226345927d7e348497136874b6d207e0b32cc52154ad8323129352923a3142f"
20912111
CALICO_TIMEOUT ?= 300s
20922112
KIND_SCRIPTS := $(SCRIPTS_DIR)/kind
20932113

@@ -2181,7 +2201,7 @@ K3D_REGISTRY_PORT ?= 12345
21812201
K3D_INTERNAL_REGISTRY := k3d-$(K3D_REGISTRY).localhost:$(K3D_REGISTRY_PORT)
21822202

21832203
.PHONY: k3d
2184-
k3d: $(TOOLS_BIN)/k3d k3d-create k3d-load-operator create-namespace ## Run a default k3d cluster
2204+
k3d: $(TOOLS_BIN)/k3d k3d-create k3d-load-operator k3d-load-coherence create-namespace ## Run a default k3d cluster
21852205

21862206
.PHONY: k3d-create
21872207
k3d-create: $(TOOLS_BIN)/k3d ## Create the k3d cluster
@@ -2203,6 +2223,7 @@ k3d-load-operator: $(TOOLS_BIN)/k3d ## Load the Operator images into the k3d cl
22032223

22042224
.PHONY: k3d-load-coherence
22052225
k3d-load-coherence: $(TOOLS_BIN)/k3d ## Load the Coherence images into the k3d cluster
2226+
$(DOCKER_CMD) pull $(COHERENCE_IMAGE)
22062227
$(TOOLS_BIN)/k3d image import $(COHERENCE_IMAGE) -c $(K3D_CLUSTER)
22072228

22082229
.PHONY: k3d-load-all

api/v1/coherence_types.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"fmt"
1414
"github.com/go-logr/logr"
1515
"github.com/go-test/deep"
16+
"github.com/oracle/coherence-operator/pkg/operator"
1617
"github.com/pkg/errors"
1718
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
1819
appsv1 "k8s.io/api/apps/v1"
@@ -3066,8 +3067,8 @@ func (in Resources) SetController(object runtime.Object, scheme *runtime.Scheme)
30663067
return nil
30673068
}
30683069

3069-
// SetHashLabels sets the hash label on all the resources.
3070-
func (in Resources) SetHashLabels(hash string) {
3070+
// SetHashLabelAndAnnotations sets the hash label on all the resources.
3071+
func (in Resources) SetHashLabelAndAnnotations(hash string) {
30713072
for _, r := range in.Items {
30723073
if r.Spec != nil {
30733074
labels := r.Spec.GetLabels()
@@ -3076,6 +3077,12 @@ func (in Resources) SetHashLabels(hash string) {
30763077
}
30773078
labels[LabelCoherenceHash] = hash
30783079
r.Spec.SetLabels(labels)
3080+
annotations := r.Spec.GetAnnotations()
3081+
if annotations == nil {
3082+
annotations = make(map[string]string)
3083+
}
3084+
annotations[AnnotationOperatorVersion] = operator.GetVersion()
3085+
r.Spec.SetAnnotations(annotations)
30793086
}
30803087
}
30813088
}

api/v1/coherence_webhook.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ func (in *Coherence) Default(_ context.Context, obj runtime.Object) error {
6363
spec.SetReplicas(spec.GetReplicas())
6464
}
6565
SetCommonDefaults(coh)
66-
67-
// apply a label with the hash of the spec - ths must be the last action here to make sure that
68-
// any modifications to the spec field are included in the hash
69-
if hash, applied := EnsureCoherenceHashLabel(coh); applied {
70-
webhookLogger.Info(fmt.Sprintf("Applied %s label", LabelCoherenceHash), "hash", hash)
71-
}
7266
return nil
7367
}
7468

@@ -130,9 +124,6 @@ func SetCommonDefaults(in CoherenceResource) {
130124
// this is an update
131125
logger.Info("Updating defaults for existing resource")
132126
}
133-
134-
// apply the Operator version annotation
135-
in.AddAnnotation(AnnotationOperatorVersion, operator.GetVersion())
136127
}
137128

138129
// The path in this annotation MUST match the const below

api/v1/coherence_webhook_job.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ func (in *CoherenceJob) Default(_ context.Context, obj runtime.Object) error {
7373
}
7474

7575
SetCommonDefaults(coh)
76-
77-
// apply a label with the hash of the spec - ths must be the last action here to make sure that
78-
// any modifications to the spec field are included in the hash
79-
if hash, applied := EnsureJobHashLabel(coh); applied {
80-
webhookLogger.Info(fmt.Sprintf("Applied %s label", LabelCoherenceHash), "hash", hash)
81-
}
8276
return nil
8377
}
8478

api/v1/coherence_webhook_job_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,6 @@ func TestJobDefaultReplicasIsSet(t *testing.T) {
2929
g.Expect(*c.Spec.Replicas).To(Equal(coh.DefaultJobReplicas))
3030
}
3131

32-
func TestJobAddVersionAnnotation(t *testing.T) {
33-
g := NewGomegaWithT(t)
34-
35-
c := coh.CoherenceJob{}
36-
err := c.Default(context.Background(), &c)
37-
g.Expect(err).To(BeNil())
38-
g.Expect(c.Annotations).NotTo(BeNil())
39-
g.Expect(c.Annotations[coh.AnnotationOperatorVersion]).To(Equal(operator.GetVersion()))
40-
g.Expect(c.Spec).NotTo(BeNil())
41-
replicas := c.Spec.CoherenceResourceSpec.Replicas
42-
g.Expect(*replicas).To(Equal(coh.DefaultJobReplicas))
43-
}
44-
4532
func TestJobShouldAddFinalizer(t *testing.T) {
4633
g := NewGomegaWithT(t)
4734
c := coh.CoherenceJob{}

api/v1/coherence_webhook_test.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,6 @@ func TestDefaultReplicasIsSet(t *testing.T) {
3030
g.Expect(*c.Spec.CoherenceResourceSpec.Replicas).To(Equal(coh.DefaultReplicas))
3131
}
3232

33-
func TestAddVersionAnnotation(t *testing.T) {
34-
g := NewGomegaWithT(t)
35-
36-
c := coh.Coherence{}
37-
err := c.Default(context.Background(), &c)
38-
g.Expect(err).NotTo(HaveOccurred())
39-
an := c.GetAnnotations()
40-
g.Expect(an).NotTo(BeNil())
41-
g.Expect(an[coh.AnnotationOperatorVersion]).To(Equal(operator.GetVersion()))
42-
g.Expect(*c.Spec.CoherenceResourceSpec.Replicas).To(Equal(coh.DefaultReplicas))
43-
}
44-
4533
func TestShouldAddFinalizer(t *testing.T) {
4634
g := NewGomegaWithT(t)
4735
c := coh.Coherence{}

0 commit comments

Comments
 (0)