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
cd standards/Tests/kaas/kaas-sonobuoy-go-example-e2e-framework/
39
+
cd standards/Tests/kaas/kaas-sonobuoy-tests/
38
40
```
39
41
40
42
#### 2. Check the prerequisites
@@ -54,16 +56,12 @@ Once all the prerequisite software is installed, you can proceed by starting an
54
56
make dev-setup
55
57
```
56
58
57
-
#### 4. Setting environment variables for the image build process
59
+
#### 4. Setting environment variables for the development process
58
60
59
-
```bash
60
-
kubectl config view
61
-
```
61
+
Set the number code of the standard you are currently working on.
62
62
63
63
```bash
64
-
export IMAGE_VERSION_TAG="dev"
65
-
export K8S_HOST=<kind-cluster-ip>
66
-
export K8S_PORT=<kind-cluster-port>
64
+
export TESTFUNCTION_CODE=<number code of the standard>
67
65
```
68
66
69
67
### Create a test
@@ -81,14 +79,15 @@ Pretend that the fictitious standard here stipulates that at least one pod MUST
81
79
The `scs_k8s_tests` directory contains the Golang files that define the tests.
82
80
83
81
```bash
84
-
cd standards/Tests/kaas/kaas-sonobuoy-go-example-e2e-framework/scs_k8s_tests
82
+
cd standards/Tests/kaas/kaas-sonobuoy-tests/scs_k8s_tests
85
83
```
86
84
87
85
First create a test file according to your standard and adhere to the naming convention accordingly.
88
86
89
87
* The prefix MUST contain the name of the standard in lower case letters.
90
88
* As a suffix, the file must end with "_test.go".
91
89
90
+
> [!NOTE]
92
91
> The suffix requirement comes from the go test framework itself. All test files must end with `_test.go`.
93
92
> Otherwise they will not be selected by the test environment.
94
93
@@ -103,10 +102,13 @@ As an example, we test here whether there are more than zero pods in the namespa
103
102
The execution of this test should fail by default as there should be no pods in the namespace and the namespace itself should not exist.
104
103
The aim is to display the results of a failed test so that we can show their interpretation in a later step.
105
104
105
+
> [!NOTE]
106
106
> Attention!!!: in order for the framework to select the functions for testing, their names must begin with "TEST_" in accordance with the naming convention of the golang test framework.
107
-
> TODO:!!! link to golang test framework docs
107
+
> The framework in use is [kubernetes-sigs/e2e-framework][e2e-framework].
108
+
> They also provide examples. Before you start implementing your own tests, you should check whether you can use one of the examples as a starting point for your own implementation.
109
+
> Have a look at: [kubernetes-sigs/e2e-framework/examples][e2e-framework-examples]
108
110
109
-
Copy the following text into the file `scs_0299_v1_example_standard_test.go`:
111
+
As an example of this step-by-step guide, copy the following text into the file `scs_0299_v1_example_standard_test.go`:
0 commit comments