Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Commit 16d2508

Browse files
authored
readme update : debug container deployment (#322)
* readme update : debug container deployment * fix review * fix PR review
1 parent d6a028c commit 16d2508

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

README.md

+22-9
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The corresponding label prefix is:
3838
test-network-function.com/generic: target
3939
```
4040

41-
When labelling a pod to be discovered and tested, the discoered pods are **in addition to** the ones
41+
When labelling a pod to be discovered and tested, the discovered pods are **in addition to** the ones
4242
explicitly configured in the testTarget sections of the config file.
4343

4444
### testTarget
@@ -140,19 +140,33 @@ For more information on the test suites, refer to [the cnf-features-deploy repos
140140

141141
## Running the tests with in a prebuild container
142142

143-
A ready to run container is available at this repository: [quay.io](https://quay.io/repository/testnetworkfunction/test-network-function)
143+
### Pulling test image
144+
An image is built and is available at this repository: [quay.io](https://quay.io/repository/testnetworkfunction/test-network-function)
145+
The image can be pulled using :
146+
```shell script
147+
docker pull quay.io/testnetworkfunction/test-network-function
148+
```
149+
### Check cluster resources
150+
Some tests suites such as platform-alteration require node access to get node configuration like hugepage.
151+
In order to get the required information, the test suite does not ssh into nodes, but instead rely on [oc debug tools ](https://docs.openshift.com/container-platform/3.7/cli_reference/basic_cli_operations.html#debug). This tool makes it easier to fetch information from nodes and also to debug running pods.
152+
153+
In short, oc debug tool will launch a new container ending with "-debug" suffix, the container will be destroyed once the debug session is done. To be able to create the debug pod, the cluster should have enough resources, otherwise those tests would fail.
144154

145-
To pull the latest container and run the tests you use the following command. There are several required arguments:
155+
**Note:**
156+
It's recommended to clean up disk space and make sure there's enough resources to deploy another container image in every node before starting the tests.
157+
### Run the tests
158+
``./run-tnf-container.sh`` script is used to launch the tests.
159+
160+
There are several required arguments:
146161

147162
* `-t` gives the local directory that contains tnf config files set up for the test.
148163
* `-o` gives the local directory that the test results will be available in once the container exits.
149-
* `-f` gives the list of suites that should be executed
150-
* Finally, list the specs to be run must be specified, space-separated.
164+
* `-f` gives the list of suites to be run, space separated.
151165

152166
Optional arguments are:
153167

154168
* `-i` gives a name to a custom TNF container image. Supports local images, as well as images from external registries.
155-
* `-k` gives a path to one or more kubeconfig files soto be used by the container to authenticate with the cluster. Paths must be separated by a colon.
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.
156170
* `-n` gives the network mode of the container. Defaults to `bridge`. 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.
157171
* `-s` gives the name of tests that should be skipped
158172

@@ -163,7 +177,7 @@ The autodiscovery first looks for paths in the `$KUBECONFIG` environment variabl
163177
./run-tnf-container.sh -k ~/.kube/config -t ~/tnf/config -o ~/tnf/output -f diagnostic access-control -s access-control-host-resource-PRIVILEGED_POD
164178
```
165179

166-
*Note*: Tests must be specified after all other arguments! see [General tests](#general-tests) for a list of available keywords.
180+
See [General tests](#general-tests) for a list of available keywords.
167181

168182
*Note*: The `run-tnf-container.sh` script performs autodiscovery of selected TNF environment variables.
169183
Currently supported environment variables include:
@@ -259,7 +273,6 @@ cd test-network-function
259273
### Building the Tests
260274

261275
In order to build the test executable, first make sure you have satisfied the [dependencies](#dependencies).
262-
263276
```shell script
264277
make build-cnf-tests
265278
```
@@ -292,7 +305,7 @@ cd test-network-function && ./test-network-function.test --help
292305
*Gotcha:* The generic test suite requires that the CNF has both `ping` and `ip` binaries installed. Please add them
293306
manually if the CNF under test does not include these. Automated installation of missing dependencies is targeted
294307
for a future version.
295-
308+
*Gotcha:* check that OCP cluster has resources to deploy [debug image](#check-cluster-resources)
296309
## Available Test Specs
297310

298311
There are two categories for CNF tests; 'General' and 'CNF-specific' (TODO).

0 commit comments

Comments
 (0)