Skip to content

Commit 3345567

Browse files
authored
pkg/test: unexport cleanupNoT (#1167)
**Description of the change:** Unexport the `cleanupNoT` function **Motivation for the change:** We should not export internal functions that we do not expect to be used outside of our own libraries. This allows us to have more freedom with changes to these functions.
1 parent 79b69b6 commit 3345567

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
- Changed the Go, Helm, and Scorecard base images to `registry.access.redhat.com/ubi7-dev-preview/ubi-minimal:7.6` ([#1142](https://github.com/operator-framework/operator-sdk/pull/1142))
1212
- CSV manifest are now versioned according to the `operator-registry` [manifest format](https://github.com/operator-framework/operator-registry#manifest-format). See issue [#900](https://github.com/operator-framework/operator-sdk/issues/900) for more details. ([#1016](https://github.com/operator-framework/operator-sdk/pull/1016))
13+
- Unexported `CleanupNoT` function from `pkg/test`, as it is only intended to be used internally ([#1167](https://github.com/operator-framework/operator-sdk/pull/1167))
1314

1415
### Deprecated
1516

pkg/test/context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ func (ctx *TestCtx) Cleanup() {
7575
}
7676
}
7777

78-
// CleanupNoT is a modified version of Cleanup; does not use t for logging, instead uses log
78+
// cleanupNoT is a modified version of Cleanup; does not use t for logging, instead uses log
7979
// intended for use by MainEntry, which does not have a testing.T
80-
func (ctx *TestCtx) CleanupNoT() {
80+
func (ctx *TestCtx) cleanupNoT() {
8181
failed := false
8282
for i := len(ctx.cleanupFns) - 1; i >= 0; i-- {
8383
err := ctx.cleanupFns[i]()

pkg/test/main_entry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func MainEntry(m *testing.M) {
117117
log.Infof("Local operator stdout: %s", string(localCmdOutBuf.Bytes()))
118118
log.Infof("Local operator stderr: %s", string(localCmdErrBuf.Bytes()))
119119
}
120-
ctx.CleanupNoT()
120+
ctx.cleanupNoT()
121121
os.Exit(exitCode)
122122
}()
123123
// create crd

0 commit comments

Comments
 (0)