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
Copy file name to clipboardExpand all lines: doc/dev/testing/running-the-tests.md
+4-12Lines changed: 4 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,22 +100,15 @@ and the operator images will be built and stored in you local docker registry.
100
100
101
101
The `make test/e2e/go` command accepts an `ARGS` variable containing flags that will be passed to `go test`:
102
102
103
-
-`-image` string - Sets the operator test image tag to be built and used in testing. Defaults to "quay.io/example/memcached-operator:v0.0.1"
103
+
-`-image-name` string - Sets the operator test image tag to be built and used in testing. Defaults to "quay.io/example/memcached-operator:v0.0.1"
104
104
-`-local-repo` string - Sets the path to the local SDK repo being tested. Defaults to the path of the SDK repo containing e2e tests. This is useful for testing customized e2e code.
105
105
106
106
An example of using `ARGS` is in the note below.
107
107
108
108
**NOTE**: Some of these tests, specifically the ansible (`test/e2e/ansible` and `test/ci-ansible`), helm
109
-
(`test/e2e/helm` and `test/ci-helm`), and CI Go (`test/e2e/ci-go`) tests, only work when the cluster shares the local docker
109
+
(`test/e2e/helm` and `test/ci-helm`), and Go (`test/e2e/go` and `test/e2e/ci-go`) tests, only work when the cluster shares the local docker
110
110
registry, as is the case with `oc cluster up` and `minikube` after running `eval $(minikube docker-env)`.
111
111
112
-
The E2E go test (`test/e2e/go`) can be run on a remote cluster by specifying an image name using a repo that you are logged into and
113
-
have permission to push to as such:
114
-
115
-
```sh
116
-
$ make test/e2e/go ARGS="-image=quay.io/example/memcached:e2e-test"
117
-
```
118
-
119
112
All other tests will run correctly on a remote cluster if `$HOME/.kube/config` points to the remote cluster and your
120
113
`KUBECONFIG` env var is either empty or is set to the path of a kubeconfig for the remote cluster.
121
114
@@ -127,9 +120,8 @@ during the go tests can cause these cleanups to fail (the ansible and helm E2E t
127
120
always clean up correctly). For example, if a segfault occurs or a user kills the
128
121
testing process, the cleanup functions for the go tests will not run. To manually clean up a test:
129
122
130
-
1. Delete the CRD (`kubectl delete -f $HOME/projects/example.com/memcached-operator/deploy/crds/cache_v1alpha1_memcached_crd.yaml`).
131
-
2. Delete the created project in `$HOME/projects/example.com/memcached-operator`
132
-
3. Delete the namespaces that the tests run in, which also deletes any resources created within the namespaces. The namespaces start with `memcached-memcached-group` or `main` and are appended with a unix timestamp (seconds since Jan 1 1970). The kubectl command can be used to delete namespaces: `kubectl delete namespace $NAMESPACE`.
123
+
1. Delete the CRD (`kubectl delete crd memcacheds.cache.example.com`).
124
+
2. Delete the namespaces that the tests run in, which also deletes any resources created within the namespaces. The namespaces start with `memcached-memcached-group` or `main` and are appended with a unix timestamp (seconds since Jan 1 1970). The kubectl command can be used to delete namespaces: `kubectl delete namespace $NAMESPACE`.
0 commit comments