UX improvements to kyaml/fn/framework

This commit is contained in:
Phillip Wittrock
2020-05-07 20:22:17 -07:00
parent 3dfc76b769
commit 5bae01fa68
6 changed files with 86 additions and 98 deletions

View File

@@ -11,7 +11,6 @@ import (
"github.com/stretchr/testify/assert"
"sigs.k8s.io/kustomize/kyaml/fn/framework"
"sigs.k8s.io/kustomize/kyaml/yaml"
)
func TestCommand_dockerfile(t *testing.T) {
@@ -22,9 +21,9 @@ func TestCommand_dockerfile(t *testing.T) {
defer os.RemoveAll(d)
// create a function
cmd := framework.Command(nil, func(nodes []*yaml.RNode) ([]*yaml.RNode, error) {
return nil, nil
})
resourceList := &framework.ResourceList{}
cmd := framework.Command(resourceList, func() error { return nil })
// generate the Dockerfile
cmd.SetArgs([]string{"gen", d})