You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lint: golangci-bin ## Run configured golangci-lint and pre-commit.sh linters against the code.
133
118
testbin/golangci-lint run ./... --config=./.golangci.yaml
134
119
hack/pre-commit.sh
135
120
136
-
envtest:
137
-
mkdir -p $(ENVTEST_ASSETS_DIR)
138
-
test -s $(ENVTEST_ASSETS_DIR)/setup-envtest || GOBIN=$(ENVTEST_ASSETS_DIR) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
121
+
##@ Tests
139
122
140
-
test: generate manifests envtest ## Run tests.
141
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./... -coverprofile cover.out$(GO_TEST_GINKGO_ARGS)
123
+
test: generate manifests envtest ## Run all the tests.
124
+
go test ./... -coverprofile cover.out
142
125
143
-
test-pvrgl: generate manifests envtest
144
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus ProtectedVolumeReplicationGroupList
126
+
test-pvrgl: generate manifests envtest## Run ProtectedVolumeReplicationGroupList tests.
127
+
go test ./controllers -coverprofile cover.out -ginkgo.focus ProtectedVolumeReplicationGroupList
145
128
146
-
test-obj: generate manifests envtest
147
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus FakeObjectStorer
129
+
test-obj: generate manifests envtest## Run ObjectStorer tests.
130
+
go test ./controllers -coverprofile cover.out -ginkgo.focus FakeObjectStorer
148
131
149
-
test-vs: generate manifests envtest
150
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers/volsync -coverprofile cover.out$(GO_TEST_GINKGO_ARGS)
132
+
test-vs: generate manifests envtest## Run VolumeSync tests.
133
+
go test ./controllers/volsync -coverprofile cover.out
151
134
152
-
test-vrg: generate manifests envtest
153
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus VolumeReplicationGroup
135
+
test-vrg: generate manifests envtest## Run VolumeReplicationGroup tests.
136
+
go test ./controllers -coverprofile cover.out -ginkgo.focus VolumeReplicationGroup
154
137
155
-
test-vrg-pvc: generate manifests envtest
156
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus VolumeReplicationGroupPVC
138
+
test-vrg-pvc: generate manifests envtest## Run VolumeReplicationGroupPVC tests.
139
+
go test ./controllers -coverprofile cover.out -ginkgo.focus VolumeReplicationGroupPVC
157
140
158
-
test-vrg-vr: generate manifests envtest
159
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus VolumeReplicationGroupVolRep
141
+
test-vrg-vr: generate manifests envtest## Run VolumeReplicationGroupVolRep tests.
142
+
go test ./controllers -coverprofile cover.out -ginkgo.focus VolumeReplicationGroupVolRep
160
143
161
-
test-vrg-vs: generate manifests envtest
162
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus VolumeReplicationGroupVolSync
144
+
test-vrg-vs: generate manifests envtest## Run VolumeReplicationGroupVolSync tests.
145
+
go test ./controllers -coverprofile cover.out -ginkgo.focus VolumeReplicationGroupVolSync
163
146
164
-
test-vrg-recipe: generate manifests envtest
165
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus VolumeReplicationGroupRecipe
147
+
test-vrg-recipe: generate manifests envtest## Run VolumeReplicationGroupRecipe tests.
148
+
go test ./controllers -coverprofile cover.out -ginkgo.focus VolumeReplicationGroupRecipe
166
149
167
-
test-vrg-kubeobjects: generate manifests envtest
168
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus VRG_KubeObjectProtection
150
+
test-vrg-kubeobjects: generate manifests envtest## Run VolumeReplicationGroupKubeObjects tests.
151
+
go test ./controllers -coverprofile cover.out -ginkgo.focus VRG_KubeObjectProtection
169
152
170
-
test-drpc: generate manifests envtest
171
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus DRPlacementControl
153
+
test-drpc: generate manifests envtest## Run DRPlacementControl tests.
154
+
go test ./controllers -coverprofile cover.out -ginkgo.focus DRPlacementControl
172
155
173
-
test-drcluster: generate manifests envtest
174
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus DRClusterController
156
+
test-drcluster: generate manifests envtest ## Run DRCluster tests.
157
+
go test ./controllers -coverprofile cover.out -ginkgo.focus DRClusterController
158
+
159
+
test-util: generate manifests envtest ## Run util tests.
160
+
go test ./controllers/util -coverprofile cover.out
161
+
162
+
test-util-pvc: generate manifests envtest ## Run util-pvc tests.
163
+
go test ./controllers/util -coverprofile cover.out -ginkgo.focus PVCS_Util
164
+
165
+
test-drenv: ## Run drenv tests.
166
+
$(MAKE) -C test
175
167
176
-
test-util: generate manifests envtest
177
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers/util -coverprofile cover.out $(GO_TEST_GINKGO_ARGS)
168
+
test-ramenctl: ## Run ramenctl tests.
169
+
$(MAKE) -C ramenctl
178
170
179
-
test-util-pvc: generate manifests envtest
180
-
KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS) go test ./controllers/util -coverprofile cover.out $(GO_TEST_GINKGO_ARGS) -ginkgo.focus PVCS_Util
171
+
e2e-rdr: generate manifests docker-build ## Run rdr-e2e tests.
172
+
./e2e/rdr-e2e.sh
181
173
182
174
coverage:
183
175
go tool cover -html=cover.out
@@ -186,15 +178,6 @@ coverage:
186
178
venv:
187
179
hack/make-venv
188
180
189
-
test-drenv:
190
-
$(MAKE) -C test
191
-
192
-
test-ramenctl:
193
-
$(MAKE) -C ramenctl
194
-
195
-
e2e-rdr: generate manifests docker-build
196
-
./e2e/rdr-e2e.sh
197
-
198
181
##@ Build
199
182
200
183
# Build manager binary
@@ -258,21 +241,35 @@ undeploy-dr-cluster: kustomize ## Undeploy dr-cluster controller from the K8s cl
258
241
##@ Tools
259
242
260
243
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
261
-
controller-gen: ## Download controller-gen locally if necessary.
0 commit comments