@@ -12,15 +12,18 @@ From the top-level origin directory, run
12
12
13
13
Where \< some_script\> .sh is one of the bucket scripts such as "core.sh".
14
14
15
- You can further narrow the set of tests being run by passing ` --ginkgo.focus="some string" ` where "some string" corresponds to
16
- the description of the test you want to run. For example one of the s2i tests (sti_incremental.go) defines:
15
+ You can further narrow the set of tests being run by passing
16
+ ` --ginkgo.focus='regex' ` where 'regex' is a regular expression matching the
17
+ description of the test you want to run. For example one of the s2i tests
18
+ (s2i_incremental.go) defines:
17
19
18
- var _ = g.Describe("builds: s2i incremental build with push and pull to authenticated registry ", func() {
20
+ var _ = g.Describe("[ builds][Slow] incremental s2i build ", func() {
19
21
20
- So you can write a focus filter that includes this test by passing ` --ginkgo.focus="s2i incremental" ` .
22
+ So you can write a focus regex that includes this test by passing
23
+ ` --ginkgo.focus='\[builds\]' ` or ` --ginkgo.focus='incremental s2i' ` .
21
24
22
25
Prerequisites
23
- -----------
26
+ -------------
24
27
25
28
In order to execute the extended tests, you have to install
26
29
[ Ginkgo] ( https://github.com/onsi/ginkgo ) framework which is used in extended
@@ -33,6 +36,68 @@ $ go get github.com/onsi/ginkgo/ginkgo
33
36
You also need to have the ` openshift ` binary in the ` PATH ` if you want to use
34
37
the shell script helpers to execute the extended tests.
35
38
39
+ Rapid local testing
40
+ --------------------
41
+
42
+ If you already have a running OpenShift cluster, e.g. one created using `oc
43
+ cluster up`, you can skip having the extended test infrastructure spin up an
44
+ OpenShift cluster each time the tests are run by setting the ` TEST_ONLY `
45
+ environment variable as follows:
46
+
47
+ ``` console
48
+ $ oc cluster up
49
+ $ oc login -u system:admin
50
+ $ export KUBECONFIG=${KUBECONFIG-$HOME / .kube/ config}
51
+ ```
52
+
53
+ Then, for example:
54
+ ``` console
55
+ $ make build-extended-test
56
+ $ TEST_ONLY=1 test/extended/core.sh --ginkgo.focus=' \[builds\]'
57
+ ```
58
+
59
+ By default the Kubernetes test framework will remove the project associated with
60
+ your test spec when it completes, regardless of whether it fails or not.
61
+ Origin's wrapper scripts may also do clean-up. This can be inconvenient when
62
+ debugging. To stop this behaviour, set the ` SKIP_TEARDOWN ` environment variable
63
+ and add the argument ` --delete-namespace=false ` :
64
+
65
+ ``` console
66
+ $ make build-extended-test
67
+ $ SKIP_TEARDOWN=1 TEST_ONLY=1 test/extended/core.sh --delete-namespace=false --ginkgo.focus=' \[builds\]'
68
+ ```
69
+
70
+ Test labels
71
+ -----------
72
+
73
+ See [ kinds of tests] ( https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md#kinds-of-tests )
74
+ for a full explanation of the labels used for each test spec. In brief:
75
+
76
+ - If a test has no labels, it is expected to run fast (under five minutes), be
77
+ able to be run in parallel, and be consistent.
78
+
79
+ - \[ Serial\] : If a test cannot be run in parallel with other tests (e.g. it
80
+ takes too many resources or restarts nodes), it is labeled \[ Serial\] , and
81
+ should be run in serial as part of a separate suite.
82
+
83
+ - \[ Slow\] : If a test takes more than five minutes to run (by itself or in
84
+ parallel with many other tests), it is labeled \[ Slow\] . This partition allows
85
+ us to run almost all of our tests quickly in parallel, without waiting for the
86
+ stragglers to finish.
87
+
88
+ OpenShift extended tests that run builds should be marked \[ Slow\] .
89
+
90
+ - Tests should be marked \[ Conformance\] when they provide test coverage for
91
+ functionality considered core and critical to a functional cluster (i.e. not
92
+ exotic features/configurations) and which is not overlapping with coverage
93
+ provided in other conformance tests. Example of a valid conformance test: "Do
94
+ builds work." Example of an invalid conformance test: "Do builds work when the
95
+ forcePull flag is set."
96
+
97
+ - In general, accessing the local host (e.g. using the docker socket) in
98
+ extended tests should be avoided. If this is unavoidable, the test should be
99
+ marked \[ local\] .
100
+
36
101
Extended tests structure
37
102
------------------------
38
103
0 commit comments