-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor E2E tests to be context-aware
- Loading branch information
1 parent
6f10571
commit b9a4145
Showing
21 changed files
with
785 additions
and
676 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -316,7 +316,7 @@ jsonnet: ## Download jsonnet locally if necessary. | |
|
||
GINKGO = $(shell pwd)/bin/ginkgo | ||
ginkgo: ## Download ginkgo and gomega locally if necessary. | ||
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/v2/[email protected].4) | ||
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/v2/[email protected].5) | ||
|
||
# go-get-tool will 'go get' any package $2 and install it to $1. | ||
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Logical Volume Manager Storage Operator Hacking | ||
|
||
## Cluster builds | ||
In order to build on the cluster you need to first have your kubeconfig configured. Once configured you can run the following steps to build on the cluster: | ||
|
||
### Configure the build | ||
|
||
```bash | ||
$ make create-buildconfig | ||
``` | ||
|
||
This will build from `https://github.com/openshift/lvm-operator` on branch `main` by default. This can be overridden by specifying the `GIT_URL` and `GIT_BRANCH` environment variables. | ||
```bash | ||
$ GIT_URL=https://github.com/my-user/lvm-operator.git \ | ||
GIT_BRANCH=my-feature-branch \ | ||
make create-buildconfig | ||
``` | ||
|
||
### Run the build | ||
Kickoff the build on the cluster. All output will be followed for the build. | ||
```bash | ||
$ make cluster-build | ||
``` | ||
|
||
### Deploy the operator | ||
To deploy the built operator run the following command: | ||
```bash | ||
$ make cluster-deploy | ||
``` | ||
|
||
To undeploy the operator you can run | ||
```bash | ||
$ make undeploy | ||
``` | ||
|
||
|
||
## Local E2E Testing | ||
|
||
1. Download OpenShift Local from https://developers.redhat.com/products/openshift-local/overview | ||
2. `crc setup` (once per machine) | ||
3. `crc start` | ||
4. ```shell | ||
credentials=$(crc console --credentials -o json) | ||
oc login -u $(echo $credentials | jq -r ".clusterConfig.adminCredentials.username") \ | ||
-p $(echo $credentials | jq -r ".clusterConfig.adminCredentials.password") \ | ||
$(echo $credentials | jq -r ".clusterConfig.url") | ||
``` | ||
5. `oc config view --raw >> /tmp/crc-kubeconfig` | ||
6. `export KUBECONFIG="/tmp/crc-kubeconfig"` | ||
7. `make deploy` | ||
8. `make e2e` | ||
|
||
### Enable Snapshot Testing | ||
|
||
Prerequisites: Ensure you have a running CRC Cluster (Step 6) | ||
|
||
1. Make sure controller is undeployed with `make undeploy` | ||
2. `oc apply -k https://github.com/kubernetes-csi/external-snapshotter//client/config/crd` | ||
3. `oc apply -k https://github.com/kubernetes-csi/external-snapshotter//deploy/kubernetes/snapshot-controller` | ||
4. Start again at Step 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.