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

Commit 533ce9a

Browse files
authored
Remove TNF_OC_DEBUG_IMAGE_ID env var (#529)
* Remove TNF_OC_DEBUG_IMAGE_ID env var We no longer need to specify the TNF_OC_DEBUG_IMAGE_ID environment variable, since we are using the new debug pod image. This commit removes all usage of the env var, and updates documentation to reflect the current situation. * Remove common/command.go handler It is no longer needed once the TNF_OC_DEBUG_IMAGE_ID environment variable is removed.
1 parent 5e2232d commit 533ce9a

File tree

7 files changed

+4
-64
lines changed

7 files changed

+4
-64
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,10 @@ export TNF_PARTNER_SRC_DIR=/home/userid/code/cnf-certification-test-partner
114114
When this variable is set, the run-cnf-suites.sh script will deploy/refresh the partner deployments/pods in the cluster before starting the test run.
115115

116116
### Disconnected environment
117-
In disconnected environment, only specific versions of images are mirrored to the local repo. For the `oc debug` command (used by a number of tests) to work, set TNF_OC_DEBUG_IMAGE_ID:
117+
In a disconnected environment, only specific versions of images are mirrored to the local repo. For those environments,
118+
the partner pod image `quay.io/testnetworkfunction/cnf-test-partner` and debug pod image `quay.io/testnetworkfunction/debug-partner` should be mirrored
119+
and `TNF_PARTNER_REPO` should be set to the local repo, e.g.:
118120

119-
```shell-script
120-
export TNF_OC_DEBUG_IMAGE_ID="registry.dfwt5g.lab:5000/openshift-release-dev/ocp-v4.0-art-dev@sha256:0f5ce898fbad3671fecd6f797130f950fb1abdbaf0d8154c22e2b59c74e3a918"
121-
```
122-
For similar reasons, the partner pod image `quay.io/testnetworkfunction/cnf-test-partner` should be mirrored too and `TNF_PARTNER_REPO` should be set to the local repo, e.g.:
123121
```shell-script
124122
export TNF_PARTNER_REPO="registry.dfwt5g.lab:5000/testnetworkfunction"
125123
```

pkg/tnf/handlers/common/command.go

-30
This file was deleted.

pkg/tnf/handlers/common/doc.go

-18
This file was deleted.

pkg/tnf/handlers/readremotefile/readremotefile.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"time"
2121

2222
"github.com/test-network-function/test-network-function/pkg/tnf"
23-
"github.com/test-network-function/test-network-function/pkg/tnf/handlers/common"
2423
"github.com/test-network-function/test-network-function/pkg/tnf/identifier"
2524
"github.com/test-network-function/test-network-function/pkg/tnf/reel"
2625
)
@@ -43,7 +42,7 @@ func NewReadRemoteFile(timeout time.Duration, nodeName, filePath string) *ReadRe
4342
timeout: timeout,
4443
result: tnf.ERROR,
4544
args: []string{
46-
"echo", "\"cat /host" + filePath + "\"", "|", common.GetOcDebugCommand(), "-q", "node/" + nodeName,
45+
"echo", "\"cat /host" + filePath + "\"", "|", "oc", "debug", "-q", "node/" + nodeName,
4746
},
4847
}
4948
}

script/run-container.sh

-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ ${TNF_CONTAINER_CLIENT} run --rm $DNS_ARG \
107107
-e TNF_PARTNER_NAMESPACE=$TNF_PARTNER_NAMESPACE \
108108
-e TNF_PARTNER_REPO=$TNF_PARTNER_REPO \
109109
-e TNF_DEPLOYMENT_TIMEOUT=$TNF_DEPLOYMENT_TIMEOUT \
110-
-e TNF_OC_DEBUG_IMAGE_ID=$TNF_OC_DEBUG_IMAGE_ID \
111110
-e LOG_LEVEL=$LOG_LEVEL \
112111
-e PATH=/usr/bin:/usr/local/oc/bin \
113112
$TNF_IMAGE \

test-network-function/common/env.go

-5
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ func Intrusive() bool {
7676
return !b
7777
}
7878

79-
// GetOcDebugImageID is for running oc debug commands in a disconnected environment with a specific oc debug pod image mirrored
80-
func GetOcDebugImageID() string {
81-
return os.Getenv("TNF_OC_DEBUG_IMAGE_ID")
82-
}
83-
8479
// logLevel retrieves the LOG_LEVEL environment variable
8580
func logLevel() string {
8681
logLevel := os.Getenv("LOG_LEVEL")

test-network-function/suite_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
"github.com/test-network-function/test-network-function/pkg/config"
3434
"github.com/test-network-function/test-network-function/pkg/junit"
3535
"github.com/test-network-function/test-network-function/pkg/tnf"
36-
tnfcommon "github.com/test-network-function/test-network-function/pkg/tnf/handlers/common"
3736

3837
utils "github.com/test-network-function/test-network-function/pkg/utils"
3938
_ "github.com/test-network-function/test-network-function/test-network-function/accesscontrol"
@@ -143,8 +142,6 @@ func TestTest(t *testing.T) {
143142
}
144143
log.Info("Version: ", gitDisplayRelease, " ( ", GitCommit, " )")
145144

146-
tnfcommon.OcDebugImageID = common.GetOcDebugImageID()
147-
148145
// Initialize the claim with the start time, tnf version, etc.
149146
claimRoot := createClaimRoot()
150147
claimData := claimRoot.Claim

0 commit comments

Comments
 (0)