Skip to content

Commit

Permalink
pkg/test: unexport cleanupNoT (operator-framework#1167)
Browse files Browse the repository at this point in the history
**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.
  • Loading branch information
AlexNPavel authored Mar 5, 2019
1 parent 79b69b6 commit 3345567
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- 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))
- 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))
- 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))

### Deprecated

Expand Down
4 changes: 2 additions & 2 deletions pkg/test/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ func (ctx *TestCtx) Cleanup() {
}
}

// CleanupNoT is a modified version of Cleanup; does not use t for logging, instead uses log
// cleanupNoT is a modified version of Cleanup; does not use t for logging, instead uses log
// intended for use by MainEntry, which does not have a testing.T
func (ctx *TestCtx) CleanupNoT() {
func (ctx *TestCtx) cleanupNoT() {
failed := false
for i := len(ctx.cleanupFns) - 1; i >= 0; i-- {
err := ctx.cleanupFns[i]()
Expand Down
2 changes: 1 addition & 1 deletion pkg/test/main_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func MainEntry(m *testing.M) {
log.Infof("Local operator stdout: %s", string(localCmdOutBuf.Bytes()))
log.Infof("Local operator stderr: %s", string(localCmdErrBuf.Bytes()))
}
ctx.CleanupNoT()
ctx.cleanupNoT()
os.Exit(exitCode)
}()
// create crd
Expand Down

0 comments on commit 3345567

Please sign in to comment.