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
bin/e2e-local.test: FORCE test/e2e/assets/chart/zz_chart.go
153
+
$(GO)test -c -tags kind,helm -o $@ ./test/e2e
154
+
155
+
# set go env and other vars, ensure that the dockerfile exists, and then build wait, cpb, and other command binaries and finally the kind image archive
Copy file name to clipboardExpand all lines: test/e2e/README.md
+45-2Lines changed: 45 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,49 @@ This runs a series of tests against the Kubernetes API to verify that OLM is fun
9
9
10
10
## How to use
11
11
12
-
`make e2e-local` in the root of the repository will fetch golang dependencies, start Minikube or using an existing Kind environment, build the appropriate images and run the tests in a fresh namespace each time.
13
12
14
-
Subsequent runs of the test suite do not need to go through the full setup process. Running individual tests (or the whole suite) can be accomplished by running `./test/e2e/run_e2e_local.sh [TestName]` with an optional test name.
13
+
Execute `make e2e-local` in the root of the repository, which will:
14
+
15
+
- optionally update `test/e2e/assets/chart/zz_chart.go` as needed
16
+
- build local executables used during testing
17
+
-`bin/e2e-local.test`
18
+
-`bin/wait`
19
+
-`bin/cpb`
20
+
-`bin/catalog`
21
+
-`bin/olm`
22
+
-`bin/package-server`
23
+
- build docker file `e2e.Dockerfile` which includes the local executables in a `kind` image archive `test/e2e-local.image.tar`
24
+
- execute `ginkgo` to run the pre-compiled test package `bin/e2e-local.test` with the `kind` image archive. This runs BDD tests defined in `test/e2e`
25
+
- these tests are run in a kind cluster that is started fresh each time the test is executed
26
+
27
+
28
+
Examples:
29
+
30
+
- Run all BDD tests (this takes a long time)
31
+
32
+
```bash
33
+
make e2e-local
34
+
```
35
+
36
+
- Run a specific BDD test using the `TEST` argument to make. Note that this argument uses regular expressions.
37
+
38
+
```bash
39
+
make e2e-local TEST='API service resource not migrated if not adoptable'
40
+
```
41
+
42
+
- If you have previously created the `bin/e2e-local.test` executable and want a quick way to ensure that your TEST regex argument will work, you can bypass the
43
+
make file and use `-dryRun` with `-focus` and see if the regex would trigger your specific test(s).
44
+
45
+
```bash
46
+
GO111MODULE=on GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/ginkgo -dryRun -focus 'API service resource not migrated if not adoptable' bin/e2e-local.test
47
+
```
48
+
49
+
- It is also possible to specify the number of parallel test nodes (i.e. one or more instances of `go test`) to run using the `NODES` argument. Defaults to 1 if not specified
50
+
51
+
```bash
52
+
make e2e-local NODES=2
53
+
```
54
+
55
+
## Build infrastructure
56
+
57
+
Note that the make file target `e2e-local` is executed by the github workflow `.github/workflows/e2e-tests.yml` and uses two parallel `go test` processes.
0 commit comments