E2e test for run with json

This commit is contained in:
Phani Teja Marupaka
2020-06-08 20:51:01 -07:00
parent b39c522cc1
commit e994b3b566
9 changed files with 76 additions and 122 deletions

View File

@@ -110,13 +110,13 @@ func (r RunFns) getNodesAndFilters() (
// the same one for reading must be used for writing if deleting Resources
var outputPkg *kio.LocalPackageReadWriter
if r.Path != "" {
outputPkg = &kio.LocalPackageReadWriter{PackagePath: r.Path}
outputPkg = &kio.LocalPackageReadWriter{PackagePath: r.Path, MatchFilesGlob: kio.MatchAll}
}
if r.Input == nil {
p.Inputs = []kio.Reader{outputPkg}
} else {
p.Inputs = []kio.Reader{&kio.ByteReader{Reader: r.Input}}
p.Inputs = []kio.Reader{&kio.ByteReader{Reader: r.Input, AcceptJSON: true}}
}
if err := p.Execute(); err != nil {
return nil, nil, outputPkg, err