revert back starlark converter name
This commit is contained in:
parent
31867a9261
commit
cb75a7383b
3 changed files with 7 additions and 7 deletions
|
@ -79,7 +79,7 @@ func provideConfigPlugin(client *scm.Client, contents core.FileService, conf spe
|
|||
func provideConvertPlugin(client *scm.Client, conf spec.Config, templateStore core.TemplateStore) core.ConvertService {
|
||||
return converter.Combine(
|
||||
converter.Legacy(false),
|
||||
converter.New(
|
||||
converter.Starlark(
|
||||
conf.Starlark.Enabled,
|
||||
),
|
||||
converter.Jsonnet(
|
||||
|
|
|
@ -22,9 +22,9 @@ import (
|
|||
"github.com/drone/drone/plugin/converter/starlark"
|
||||
)
|
||||
|
||||
// New returns a conversion service that converts the
|
||||
// Starlark returns a conversion service that converts the
|
||||
// starlark file to a yaml file.
|
||||
func New(enabled bool) core.ConvertService {
|
||||
func Starlark(enabled bool) core.ConvertService {
|
||||
return &starlarkPlugin{
|
||||
enabled: enabled,
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
)
|
||||
|
||||
func TestStarlarkConvert(t *testing.T) {
|
||||
plugin := New(true)
|
||||
plugin := Starlark(true)
|
||||
|
||||
req := &core.ConvertArgs{
|
||||
Build: &core.Build{
|
||||
|
@ -100,7 +100,7 @@ func TestConvert_Multi(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
plugin := New(true)
|
||||
plugin := Starlark(true)
|
||||
config, err := plugin.Convert(noContext, req)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
@ -125,7 +125,7 @@ func TestConvert_Multi(t *testing.T) {
|
|||
// this test verifies the plugin is skipped when it has
|
||||
// not been explicitly enabled.
|
||||
func TestConvert_Skip(t *testing.T) {
|
||||
plugin := New(false)
|
||||
plugin := Starlark(false)
|
||||
config, err := plugin.Convert(noContext, nil)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
@ -145,7 +145,7 @@ func TestConvert_SkipYaml(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
plugin := New(true)
|
||||
plugin := Starlark(true)
|
||||
config, err := plugin.Convert(noContext, req)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
|
Loading…
Reference in a new issue