@@ -28,6 +28,7 @@ import (
28
28
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/build"
29
29
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/config"
30
30
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner"
31
+ "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext"
31
32
"github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest"
32
33
"github.com/GoogleContainerTools/skaffold/testutil"
33
34
)
@@ -49,8 +50,8 @@ func (r *mockRunner) Stop() error {
49
50
}
50
51
51
52
func TestTagFlag (t * testing.T ) {
52
- mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , []* latest.SkaffoldConfig , error ) {
53
- return & mockRunner {}, []* latest.SkaffoldConfig {{}}, nil
53
+ mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , * runcontext. RunContext , []* latest.SkaffoldConfig , error ) {
54
+ return & mockRunner {}, & runcontext. RunContext {}, []* latest.SkaffoldConfig {{}}, nil
54
55
}
55
56
56
57
testutil .Run (t , "override tag with argument" , func (t * testutil.T ) {
@@ -68,8 +69,8 @@ func TestTagFlag(t *testing.T) {
68
69
}
69
70
70
71
func TestQuietFlag (t * testing.T ) {
71
- mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , []* latest.SkaffoldConfig , error ) {
72
- return & mockRunner {}, []* latest.SkaffoldConfig {{}}, nil
72
+ mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , * runcontext. RunContext , []* latest.SkaffoldConfig , error ) {
73
+ return & mockRunner {}, nil , []* latest.SkaffoldConfig {{}}, nil
73
74
}
74
75
75
76
tests := []struct {
@@ -114,8 +115,8 @@ func TestQuietFlag(t *testing.T) {
114
115
}
115
116
116
117
func TestFileOutputFlag (t * testing.T ) {
117
- mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , []* latest.SkaffoldConfig , error ) {
118
- return & mockRunner {}, []* latest.SkaffoldConfig {{}}, nil
118
+ mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , * runcontext. RunContext , []* latest.SkaffoldConfig , error ) {
119
+ return & mockRunner {}, nil , []* latest.SkaffoldConfig {{}}, nil
119
120
}
120
121
121
122
tests := []struct {
@@ -177,16 +178,16 @@ func TestFileOutputFlag(t *testing.T) {
177
178
}
178
179
179
180
func TestRunBuild (t * testing.T ) {
180
- errRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , []* latest.SkaffoldConfig , error ) {
181
- return nil , nil , errors .New ("some error" )
181
+ errRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , * runcontext. RunContext , []* latest.SkaffoldConfig , error ) {
182
+ return nil , nil , nil , errors .New ("some error" )
182
183
}
183
- mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , []* latest.SkaffoldConfig , error ) {
184
- return & mockRunner {}, []* latest.SkaffoldConfig {{}}, nil
184
+ mockCreateRunner := func (io.Writer , config.SkaffoldOptions ) (runner.Runner , * runcontext. RunContext , []* latest.SkaffoldConfig , error ) {
185
+ return & mockRunner {}, nil , []* latest.SkaffoldConfig {{}}, nil
185
186
}
186
187
187
188
tests := []struct {
188
189
description string
189
- mock func (io.Writer , config.SkaffoldOptions ) (runner.Runner , []* latest.SkaffoldConfig , error )
190
+ mock func (io.Writer , config.SkaffoldOptions ) (runner.Runner , * runcontext. RunContext , []* latest.SkaffoldConfig , error )
190
191
shouldErr bool
191
192
}{
192
193
{
0 commit comments