Skip to content

Commit 84ec394

Browse files
authored
CLOUDP-349099: Fix labels (#2865)
* Remove e2e_local.sh * Re-surface reconcile test labels * Re-surface helm-ns label, but focus entry labels * Detach AtlasDeploymentSharding from AtlasDeployment Signed-off-by: jose.vazquez <jose.vazquez@mongodb.com> --------- Signed-off-by: jose.vazquez <jose.vazquez@mongodb.com>
1 parent 504a138 commit 84ec394

File tree

6 files changed

+165
-146
lines changed

6 files changed

+165
-146
lines changed

.github/workflows/test-int.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
test: ["AtlasProject", "AtlasDeployment && !AtlasDeploymentSharding", "AtlasDatabaseUser", "AtlasDataFederation", "AtlasFederatedAuth", "AtlasDeploymentSharding", "AtlasStreams"]
15+
test: ["AtlasProject", "AtlasDeployment", "AtlasDatabaseUser", "AtlasDataFederation", "AtlasFederatedAuth", "AtlasDeploymentSharding", "AtlasStreams"]
1616
target: [ "test/int" ]
1717
nodes: [12]
1818
include:

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ KUBEBUILDER_ASSETS ?= $(ENVTEST_ASSETS_DIR)/k8s/$(ENVTEST_K8S_VERSION)-$(TARGET_
115115
GINKGO_NODES ?= 12
116116
GINKGO_EDITOR_INTEGRATION ?= true
117117
GINKGO_OPTS = -vv --randomize-all --output-interceptor-mode=none --trace --timeout 90m --race --nodes=$(GINKGO_NODES) --cover --coverpkg=github.com/mongodb/mongodb-atlas-kubernetes/v2/... --coverprofile=coverprofile.out
118-
GINKGO_FILTER_LABEL ?=
118+
GINKGO_FILTER_LABEL ?= $(label)
119119
ifneq ($(GINKGO_FILTER_LABEL),)
120120
GINKGO_FILTER_LABEL_OPT := --label-filter="$(GINKGO_FILTER_LABEL)"
121121
endif
122-
GINKGO=ginkgo run $(GINKGO_OPTS) $(GINKGO_FILTER_LABEL_OPT) $(shell pwd)/$@
122+
GINKGO=ginkgo run $(GINKGO_OPTS) $(GINKGO_FILTER_LABEL_OPT)
123123

124124
BASE_GO_PACKAGE = github.com/mongodb/mongodb-atlas-kubernetes/v2
125125
GO_LICENSES = go-licenses
@@ -233,10 +233,10 @@ unit-test: manifests
233233

234234
## Run integration tests. Sample with labels: `make test/int GINKGO_FILTER_LABEL=AtlasProject`
235235
test/int: envtest manifests
236-
AKO_INT_TEST=1 KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) $(GINKGO)
236+
AKO_INT_TEST=1 KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) $(GINKGO) $(shell pwd)/$@
237237

238238
test/int/clusterwide: envtest manifests
239-
AKO_INT_TEST=1 KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) $(GINKGO)
239+
AKO_INT_TEST=1 KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) $(GINKGO) $(shell pwd)/$@
240240

241241
envtest: envtest-assets
242242
KUBEBUILDER_ASSETS=$(shell setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir $(ENVTEST_ASSETS_DIR) -p path)
@@ -246,8 +246,8 @@ envtest-assets:
246246
mkdir -p $(ENVTEST_ASSETS_DIR)
247247

248248
.PHONY: e2e
249-
e2e: bundle run-kind ## Run e2e test. Command `make e2e label=cluster-ns` run cluster-ns test
250-
./scripts/e2e_local.sh $(label) $(build)
249+
e2e: bundle manifests run-kind ## Run e2e test. Command `make e2e label=cluster-ns` run cluster-ns test
250+
AKO_E2E_TEST=1 $(GINKGO) $(shell pwd)/test/$@
251251

252252
.PHONY: e2e2
253253
e2e2: run-kind manager install-credentials install-crds set-namespace ## Run e2e2 tests. Command `make e2e2 label=integrations-ctlr` run integrations-ctlr e2e2 test

scripts/e2e_local.sh

Lines changed: 0 additions & 58 deletions
This file was deleted.

test/e2e/cache_watch_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,19 @@ var _ = Describe("Reconciles test:", func() {
240240
})
241241
},
242242

243-
Entry("All namespaces when no namespace config is set", Label("focus-reconcile-all"), &tc{
243+
Entry("All namespaces when no namespace config is set", Label("reconcile-all"), &tc{
244244
namespaces: []string{"ns1", "ns2", "ns3"},
245245
watchNamespaces: nil,
246246
wantToFind: []string{"ns1", "ns2", "ns3"},
247247
}),
248248

249-
Entry("One namespace when only one namespace is configured", Label("focus-reconcile-one"), &tc{
249+
Entry("One namespace when only one namespace is configured", Label("reconcile-one"), &tc{
250250
namespaces: []string{"ns1", "ns2", "ns3"},
251251
watchNamespaces: []string{"ns1"},
252252
wantToFind: []string{"ns1"},
253253
}),
254254

255-
Entry("Two namespaces when only those two are configured", Label("focus-reconcile-two"), &tc{
255+
Entry("Two namespaces when only those two are configured", Label("reconcile-two"), &tc{
256256
namespaces: []string{"ns1", "ns2", "ns3"},
257257
watchNamespaces: []string{"ns1", "ns2"},
258258
wantToFind: []string{"ns1", "ns2"},

test/e2e/helm_chart_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var _ = Describe("HELM charts", Ordered, FlakeAttempts(2), func() {
9999
})
100100
})
101101

102-
DescribeTable("Namespaced operators working only with its own namespace with different configuration", Label("focus-helm-ns"),
102+
DescribeTable("Namespaced operators working only with its own namespace with different configuration", Label("helm-ns"),
103103
func(test model.TestDataProvider, deploymentType string) { // deploymentType - probably will be moved later ()
104104
data = test
105105
GinkgoWriter.Println(data.Resources.KeyName)
@@ -128,7 +128,7 @@ var _ = Describe("HELM charts", Ordered, FlakeAttempts(2), func() {
128128
})
129129
deleteDeploymentAndOperator(&data)
130130
},
131-
Entry("Several actions with helm update", Label("helm-ns-flow"),
131+
Entry("Several actions with helm update", Label("focus-helm-ns-flow"),
132132
model.DataProviderWithResources(
133133
"helm-ns",
134134
model.AProject{},
@@ -150,7 +150,7 @@ var _ = Describe("HELM charts", Ordered, FlakeAttempts(2), func() {
150150
),
151151
"flex",
152152
),
153-
Entry("Deployment multiregion by helm chart", Label("helm-advanced-multiregion"),
153+
Entry("Deployment multiregion by helm chart", Label("focus-helm-advanced-multiregion"),
154154
model.DataProviderWithResources(
155155
"helm-advanced-multiregion",
156156
model.AProject{},
@@ -168,7 +168,7 @@ var _ = Describe("HELM charts", Ordered, FlakeAttempts(2), func() {
168168
),
169169
"advanced",
170170
),
171-
Entry("Flex deployment by helm chart", Label("helm-flex"),
171+
Entry("Flex deployment by helm chart", Label("focus-helm-flex"),
172172
model.DataProviderWithResources(
173173
"helm-flex",
174174
model.AProject{},

0 commit comments

Comments
 (0)