fix exec failure for gomock finish calling

Signed-off-by: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
pacoxu 2021-06-18 18:10:54 +08:00 committed by paco
parent 8ab66dcc4e
commit abd8acc259

View File

@ -135,7 +135,8 @@ func TestExecInContainer(t *testing.T) {
}}
eh := &NativeExecHandler{}
ctrl := gomock.NewController(t)
// to avoid the default calling Finish(). More details in https://github.com/golang/mock/pull/422/
ctrl := gomock.NewController(struct{ gomock.TestReporter }{t})
container := getFakeContainerJSON()
cmd := []string{"/bin/bash"}
var stdin io.Reader