Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 5060f43

Browse files
authored
Add instruction to run tests (#1121)
* Add instruction to run tests Fixes #836 Signed-off-by: Baiju Muthukadan <[email protected]>
1 parent ddc725f commit 5060f43

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

CONTRIBUTING.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,47 @@ put us into an unreleasable state
238238
* Unit tests:
239239
* Coverage should remain the same or increase
240240

241-
## Pull Request Workflow
241+
## Running Acceptance Tests
242+
243+
1. Set KUBECONFIG for both minikube and acceptance tests (it will be generated at minikube's start if it does not exist):
244+
245+
```
246+
export KUBECONFIG=/tmp/minikubeconfig
247+
```
248+
249+
2. Start minikube:
250+
251+
```
252+
./hack/start-minikube.sh
253+
```
254+
255+
3. Enable olm on minikube:
256+
257+
258+
```
259+
minikube addons enable olm
260+
```
261+
262+
4. Deploy operator to the minikube cluster
263+
264+
```
265+
eval $(minikube docker-env)
266+
make deploy OPERATOR_REPO_REF=$(minikube ip):5000/sbo
267+
```
268+
269+
5. Execute all acceptance tests tagged with `@dev` using `kubectl` CLI:
270+
271+
```
272+
make test-acceptance TEST_ACCEPTANCE_TAGS="@dev" TEST_ACCEPTANCE_START_SBO=remote TEST_ACCEPTANCE_CLI=kubectl
273+
```
274+
275+
To run a specific test:
276+
277+
```
278+
make test-acceptance TEST_ACCEPTANCE_START_SBO=remote TEST_ACCEPTANCE_CLI=kubectl EXTRA_BEHAVE_ARGS='-n "Specify path of secret in the Service Binding"'
279+
```
280+
281+
# Pull Request Workflow
242282

243283
- Fork the repository and clone it your work directory
244284
- Create a topic branch from where you want to base your work

0 commit comments

Comments
 (0)