@@ -85,7 +85,7 @@ func ok(t testing.TB, err error) {
8585 }
8686}
8787
88- func waitProcess (p * libcontainer.Process , t * testing.T ) {
88+ func waitProcess (p * libcontainer.Process , t testing.TB ) {
8989 t .Helper ()
9090 status , err := p .Wait ()
9191 if err != nil {
@@ -99,7 +99,7 @@ func waitProcess(p *libcontainer.Process, t *testing.T) {
9999
100100// newRootfs creates a new tmp directory and copies the busybox root
101101// filesystem to it.
102- func newRootfs (t * testing.T ) string {
102+ func newRootfs (t testing.TB ) string {
103103 t .Helper ()
104104 dir := t .TempDir ()
105105 if err := copyBusybox (dir ); err != nil {
@@ -165,7 +165,7 @@ func copyBusybox(dest string) error {
165165 return nil
166166}
167167
168- func newContainer (t * testing.T , config * configs.Config ) (* libcontainer.Container , error ) {
168+ func newContainer (t testing.TB , config * configs.Config ) (* libcontainer.Container , error ) {
169169 name := strings .ReplaceAll (t .Name (), "/" , "_" ) + strconv .FormatInt (- int64 (time .Now ().Nanosecond ()), 35 )
170170 root := t .TempDir ()
171171
@@ -176,7 +176,7 @@ func newContainer(t *testing.T, config *configs.Config) (*libcontainer.Container
176176//
177177// buffers are returned containing the STDOUT and STDERR output for the run
178178// 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 ) {
180180 container , err := newContainer (t , config )
181181 if err != nil {
182182 return nil , - 1 , err
@@ -214,7 +214,7 @@ func runContainer(t *testing.T, config *configs.Config, args ...string) (buffers
214214
215215// runContainerOk is a wrapper for runContainer, simplifying its use for cases
216216// 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 {
218218 buffers , exitCode , err := runContainer (t , config , args ... )
219219
220220 t .Helper ()
0 commit comments