Skip to content

Commit 8da333c

Browse files
committed
test: remove unnecessary integration tests layers
Drop `hack/test-prerequisites.go` because it was only used to install CRDs that will be present on all OpenShift clusters (I dont think testing against plain k8s clusters is something that we ever needed). With new CRDs such as `ClusterVersionOperator` this gets stale, and the script did not take feature sets into account either. Drop the `hack/test-integration.sh` because its only purpose was to run the prerequisite installation dropped above before `go test`. `Makefile` can easily run the `go test` incantation for integration tests itself, just as it does for `make test`, and it is immediately different how integration tests are different from normal ones. Also update some related documentation.
1 parent 3a6c08b commit 8da333c

File tree

4 files changed

+5
-72
lines changed

4 files changed

+5
-72
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ test:
1212
.PHONY: test
1313

1414
integration-test:
15-
hack/test-integration.sh
15+
# This runs against a real OpenShift cluster through the current KUBECONFIG context
16+
TEST_INTEGRATION=1 go test ./... -test.run=^TestIntegration
1617
.PHONY: integration-test
1718

1819
update: build

docs/dev/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ Run `make test` to execute all unit tests.
5959

6060
### Integration tests
6161

62-
The [`hack/test-integration.sh`](../../hack/test-integration.sh) script executes integration tests against an OpenShift
63-
cluster. It requires `$KUBECONFIG` with administrator credentials. Only execute integration tests against disposable
64-
testing clusters.
62+
Run `make integration-test` to execute integration tests against an OpenShift cluster. It requires `$KUBECONFIG` with
63+
administrator credentials. Only execute integration tests against disposable testing clusters.
6564

6665
```console
6766
$ export KUBECONFIG=<admin kubeconfig path>
68-
$ ./hack/test-integration.sh
67+
$ make integration-test
6968
```
7069

7170
### Replace cluster's CVO with development CVO release payload image

hack/test-integration.sh

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

hack/test-prerequisites.go

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

0 commit comments

Comments
 (0)