@@ -85,7 +85,7 @@ func ok(t testing.TB, err error) {
85
85
}
86
86
}
87
87
88
- func waitProcess (p * libcontainer.Process , t * testing.T ) {
88
+ func waitProcess (p * libcontainer.Process , t testing.TB ) {
89
89
t .Helper ()
90
90
status , err := p .Wait ()
91
91
if err != nil {
@@ -99,7 +99,7 @@ func waitProcess(p *libcontainer.Process, t *testing.T) {
99
99
100
100
// newRootfs creates a new tmp directory and copies the busybox root
101
101
// filesystem to it.
102
- func newRootfs (t * testing.T ) string {
102
+ func newRootfs (t testing.TB ) string {
103
103
t .Helper ()
104
104
dir := t .TempDir ()
105
105
if err := copyBusybox (dir ); err != nil {
@@ -165,7 +165,7 @@ func copyBusybox(dest string) error {
165
165
return nil
166
166
}
167
167
168
- func newContainer (t * testing.T , config * configs.Config ) (* libcontainer.Container , error ) {
168
+ func newContainer (t testing.TB , config * configs.Config ) (* libcontainer.Container , error ) {
169
169
name := strings .ReplaceAll (t .Name (), "/" , "_" ) + strconv .FormatInt (- int64 (time .Now ().Nanosecond ()), 35 )
170
170
root := t .TempDir ()
171
171
@@ -176,7 +176,7 @@ func newContainer(t *testing.T, config *configs.Config) (*libcontainer.Container
176
176
//
177
177
// buffers are returned containing the STDOUT and STDERR output for the run
178
178
// along with the exit code and any go error
179
- func runContainer (t * testing.T , config * configs.Config , args ... string ) (buffers * stdBuffers , exitCode int , err error ) {
179
+ func runContainer (t testing.TB , config * configs.Config , args ... string ) (buffers * stdBuffers , exitCode int , err error ) {
180
180
container , err := newContainer (t , config )
181
181
if err != nil {
182
182
return nil , - 1 , err
@@ -214,7 +214,7 @@ func runContainer(t *testing.T, config *configs.Config, args ...string) (buffers
214
214
215
215
// runContainerOk is a wrapper for runContainer, simplifying its use for cases
216
216
// when the run is expected to succeed and return exit code of 0.
217
- func runContainerOk (t * testing.T , config * configs.Config , args ... string ) * stdBuffers {
217
+ func runContainerOk (t testing.TB , config * configs.Config , args ... string ) * stdBuffers {
218
218
buffers , exitCode , err := runContainer (t , config , args ... )
219
219
220
220
t .Helper ()
0 commit comments