diff --git a/engine/compiler/clone_test.go b/engine/compiler/clone_test.go index e3cfd28..99f2955 100644 --- a/engine/compiler/clone_test.go +++ b/engine/compiler/clone_test.go @@ -32,7 +32,7 @@ func TestClone(t *testing.T) { Secret: secret.Static(nil), Environ: provider.Static(nil), } - args := Args{ + args := runtime.CompilerArgs{ Repo: &drone.Repo{}, Build: &drone.Build{}, Stage: &drone.Stage{}, @@ -57,7 +57,7 @@ func TestClone(t *testing.T) { }, }, } - got := c.Compile(nocontext, args) + got := c.Compile(nocontext, args).(*engine.Spec) ignore := cmpopts.IgnoreFields(engine.Step{}, "Envs", "Labels") if diff := cmp.Diff(got.Steps, want, ignore); len(diff) != 0 { t.Errorf(diff) @@ -70,7 +70,7 @@ func TestCloneDisable(t *testing.T) { Registry: registry.Static(nil), Secret: secret.Static(nil), } - args := Args{ + args := runtime.CompilerArgs{ Repo: &drone.Repo{}, Build: &drone.Build{}, Stage: &drone.Stage{}, @@ -79,7 +79,7 @@ func TestCloneDisable(t *testing.T) { Manifest: &manifest.Manifest{}, Pipeline: &resource.Pipeline{Clone: manifest.Clone{Disable: true}}, } - got := c.Compile(nocontext, args) + got := c.Compile(nocontext, args).(*engine.Spec) if len(got.Steps) != 0 { t.Errorf("Expect no clone step added when disabled") } diff --git a/engine/compiler/compiler_test.go b/engine/compiler/compiler_test.go index 5c0b536..9030979 100644 --- a/engine/compiler/compiler_test.go +++ b/engine/compiler/compiler_test.go @@ -107,7 +107,7 @@ func TestCompile_Secrets(t *testing.T) { "my_username": "octocat", }), } - args := Args{ + args := runtime.CompilerArgs{ Repo: &drone.Repo{}, Build: &drone.Build{}, Stage: &drone.Stage{}, @@ -118,7 +118,7 @@ func TestCompile_Secrets(t *testing.T) { Secret: secret.Static(nil), } - ir := compiler.Compile(nocontext, args) + ir := compiler.Compile(nocontext, args).(*engine.Spec) got := ir.Steps[0].Secrets want := []*engine.Secret{ { @@ -169,7 +169,7 @@ func testCompile(t *testing.T, source, golden string) *engine.Spec { "my_username": "octocat", }), } - args := Args{ + args := runtime.CompilerArgs{ Repo: &drone.Repo{}, Build: &drone.Build{Target: "master"}, Stage: &drone.Stage{}, @@ -203,7 +203,7 @@ func testCompile(t *testing.T, source, golden string) *engine.Spec { t.Errorf(diff) } - return got + return got.(*engine.Spec) } func dump(v interface{}) { diff --git a/go.mod b/go.mod index 2ef1234..1218399 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/drone/drone-go v1.1.1-0.20191119212130-1d2e07e87e79 github.com/drone/drone-runtime v1.1.0 github.com/drone/envsubst v1.0.2 - github.com/drone/runner-go v1.4.1-0.20191206210533-80bb9688cb0c + github.com/drone/runner-go v1.5.0 github.com/drone/signal v1.0.0 github.com/ghodss/yaml v1.0.0 github.com/golang/mock v1.3.1 diff --git a/go.sum b/go.sum index 8882ab5..bae946f 100644 --- a/go.sum +++ b/go.sum @@ -56,6 +56,8 @@ github.com/drone/runner-go v1.4.1-0.20191206204642-f16a481b8b8f h1:TC1w5LWTOEbba github.com/drone/runner-go v1.4.1-0.20191206204642-f16a481b8b8f/go.mod h1:ZIhsNU4EHG7R7J+OXeXuwwAxlxOBYLCc0gCkbbhWb/o= github.com/drone/runner-go v1.4.1-0.20191206210533-80bb9688cb0c h1:T3CIdRKiTiaNbInLmtPOoY/9BNUPaL2ipBr2jHzaJsE= github.com/drone/runner-go v1.4.1-0.20191206210533-80bb9688cb0c/go.mod h1:ZIhsNU4EHG7R7J+OXeXuwwAxlxOBYLCc0gCkbbhWb/o= +github.com/drone/runner-go v1.5.0 h1:4cgQn+ZIf9TKHQpAF8wC06knqSULZ8T46tFxPZ5ADs0= +github.com/drone/runner-go v1.5.0/go.mod h1:ZIhsNU4EHG7R7J+OXeXuwwAxlxOBYLCc0gCkbbhWb/o= github.com/drone/signal v1.0.0 h1:NrnM2M/4yAuU/tXs6RP1a1ZfxnaHwYkd0kJurA1p6uI= github.com/drone/signal v1.0.0/go.mod h1:S8t92eFT0g4WUgEc/LxG+LCuiskpMNsG0ajAMGnyZpc= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=