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
{{ message }}
This repository was archived by the owner on Aug 26, 2022. It is now read-only.
Non of the existing TCs in the diagnostic test suite is actually a TC,
since they cannot fail. They're just retrieving information from the
cluster, so the only way for them to fail comes from network or cluster
permissions related errors. On those cases, the output of any other
TS/TC would also be unreliable/unstrustable.
This PR makes the diagnostic retrieval to be done right before any other
TS, so the claim.json will always have that information, no matter which
TS was launched.
The flag.Parse() function was not needed, since ginkgo calls it
internally before calling TestTest() function. This second flag.Parse()
call was reparsing everything and creating duplicates in the ginkgo
config slices like FocusStrings/SkipStrings.
+ Some refactors, plus discarding -s and -l flags when -f is not set.
Copy file name to clipboardExpand all lines: CATALOG.md
-63
Original file line number
Diff line number
Diff line change
@@ -111,69 +111,6 @@ Result Type|normative
111
111
Suggested Remediation|Ensure that your Operator has passed Red Hat's Operator Certification Program (OCP).
112
112
Best Practice Reference|[CNF Best Practice V1.2](https://connect.redhat.com/sites/default/files/2021-03/Cloud%20Native%20Network%20Function%20Requirements.pdf) Section 6.2.12 and Section 6.3.3
Description|http://test-network-function.com/testcases/diagnostic/cluster-csi-info extracts CSI driver information in the cluster.
125
-
Result Type|informative
126
-
Suggested Remediation|
127
-
Best Practice Reference|[CNF Best Practice V1.2](https://connect.redhat.com/sites/default/files/2021-03/Cloud%20Native%20Network%20Function%20Requirements.pdf) Section 6.3.6
Description|http://test-network-function.com/testcases/diagnostic/clusterversion Extracts OCP versions from the cluster.
137
-
Result Type|informative
138
-
Suggested Remediation|
139
-
Best Practice Reference|[CNF Best Practice V1.2](https://connect.redhat.com/sites/default/files/2021-03/Cloud%20Native%20Network%20Function%20Requirements.pdf) Section 6.3.6
140
-
#### extract-node-information
141
-
142
-
Property|Description
143
-
---|---
144
-
Test Case Name|extract-node-information
145
-
Test Case Label|diagnostic-extract-node-information
Description|http://test-network-function.com/testcases/diagnostic/extract-node-information extracts informational information about the cluster.
149
-
Result Type|informative
150
-
Suggested Remediation|
151
-
Best Practice Reference|[CNF Best Practice V1.2](https://connect.redhat.com/sites/default/files/2021-03/Cloud%20Native%20Network%20Function%20Requirements.pdf) Section 6.3.6
Best Practice Reference|[CNF Best Practice V1.2](https://connect.redhat.com/sites/default/files/2021-03/Cloud%20Native%20Network%20Function%20Requirements.pdf) Section 6.2.4 and 6.3.7
Description|http://test-network-function.com/testcases/diagnostic/nodes-hw-info list nodes HW info
173
-
Result Type|normative
174
-
Suggested Remediation|
175
-
Best Practice Reference|[CNF Best Practice V1.2](https://connect.redhat.com/sites/default/files/2021-03/Cloud%20Native%20Network%20Function%20Requirements.pdf) Section 6.2
Copy file name to clipboardExpand all lines: README.md
+13-12
Original file line number
Diff line number
Diff line change
@@ -161,21 +161,21 @@ There are several required arguments:
161
161
162
162
*`-t` gives the local directory that contains tnf config files set up for the test.
163
163
*`-o` gives the local directory that the test results will be available in once the container exits. This directory must exist in order for the claim file to be written.
164
-
*`-f` gives the list of suites to be run, space separated.
165
164
166
165
Optional arguments are:
167
-
166
+
*`-f` gives the list of suites to be run, space separated.
167
+
*`-s` gives the name of tests that should be skipped. This flag is discarded if no `-f` was set.
168
168
*`-i` gives a name to a custom TNF container image. Supports local images, as well as images from external registries.
169
169
*`-k` gives a path to one or more kubeconfig files to be used by the container to authenticate with the cluster. Paths must be separated by a colon.
170
170
*`-n` gives the network mode of the container. Defaults set to `host`, which requires selinux to be disabled. Alternatively, `bridge` mode can be used with selinux if TNF_CONTAINER_CLIENT is set to `docker` or running the test as root. See the [docker run --network parameter reference](https://docs.docker.com/engine/reference/run/#network-settings) for more information on how to configure network settings.
171
-
*`-s` gives the name of tests that should be skipped
172
171
172
+
If `-f` is not specified, the tnf will run in 'diagnostic' mode. In this mode, no test case will run: it will only get information from the cluster (PUTs, CRDs, nodes info, etc...) to save it in the claim file. This can be used to make sure the configuration was properly set and the autodiscovery found the right pods/crds...
173
173
174
174
If `-k` is not specified, autodiscovery is performed.
175
175
The autodiscovery first looks for paths in the `$KUBECONFIG` environment variable on the host system, and if the variable is not set or is empty, the default configuration stored in `$HOME/.kube/config` is checked.
As with "run-tnf-container.sh", if `-f` is not specified here, the tnf will run in 'diagnostic' mode. See [Run the tests](#run-the-tests) section for more info.
287
+
286
288
By default the claim file will be output into the same location as the test executable. The `-o` argument for
287
289
`run-cnf-suites.sh` can be used to provide a new location that the output files will be saved to. For more detailed
288
290
control over the outputs, see the output of `test-network-function.test --help`.
@@ -337,7 +339,6 @@ Suite|Test Spec Description|Minimum OpenShift Version
337
339
---|---|---
338
340
`access-control`|The access-control test suite is used to test service account, namespace and cluster/pod role binding for the pods under test. It also tests the pods/containers configuration.|4.6.0
339
341
`affiliated-certification`|The affiliated-certification test suite verifies that the containers and operators listed in the configuration file or used by the CNF are certified by Redhat|4.6.0
340
-
`diagnostic`|The diagnostic test suite is used to gather node information from an OpenShift cluster. The diagnostic test suite should be run whenever generating a claim.json file.|4.6.0
341
342
`lifecycle`| The lifecycle test suite verifies the pods deployment, creation, shutdown and survivability. |4.6.0
342
343
`networking`|The networking test suite contains tests that check connectivity and networking config related best practices.|4.6.0
343
344
`operator`|The operator test suite is designed to test basic Kubernetes Operator functionality.|4.6.0
0 commit comments