mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 16:42:51 +00:00
Merge pull request #3880 from Shell32-Natsu/func-filter-result
Make result in function filter public
This commit is contained in:
@@ -90,6 +90,7 @@ func skipIfNoDocker(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFnContainerGenerator(t *testing.T) {
|
||||
t.Skip("wait for #3881")
|
||||
skipIfNoDocker(t)
|
||||
|
||||
// Function plugins should not need the env setup done by MakeEnhancedHarness
|
||||
@@ -306,6 +307,7 @@ spec:
|
||||
}
|
||||
|
||||
func TestFnContainerTransformer(t *testing.T) {
|
||||
t.Skip("wait for #3881")
|
||||
skipIfNoDocker(t)
|
||||
|
||||
// Function plugins should not need the env setup done by MakeEnhancedHarness
|
||||
|
||||
@@ -84,11 +84,11 @@ spec:
|
||||
return
|
||||
}
|
||||
|
||||
if !assert.Equal(t, fmt.Sprintf(`.
|
||||
if !assert.Equal(t, `.
|
||||
├── [f1.yaml] Deployment foo
|
||||
├── [f1.yaml] Service foo
|
||||
└── [f2.yaml] Deployment bar
|
||||
`), b.String()) {
|
||||
`, b.String()) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ type FunctionFilter struct {
|
||||
DeferFailure bool
|
||||
|
||||
// results saves the results emitted from Run
|
||||
results *yaml.RNode
|
||||
Results *yaml.RNode
|
||||
|
||||
// exit saves the error returned from Run
|
||||
exit error
|
||||
@@ -250,7 +250,7 @@ func (c *FunctionFilter) doResults(r *kio.ByteReader) error {
|
||||
}
|
||||
|
||||
if r.Results != nil {
|
||||
c.results = r.Results
|
||||
c.Results = r.Results
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1090,7 +1090,7 @@ metadata:
|
||||
if len(tt.instance.ResultsFile) > 0 {
|
||||
tt.expectedResults = strings.TrimSpace(tt.expectedResults)
|
||||
|
||||
results, err := tt.instance.results.String()
|
||||
results, err := tt.instance.Results.String()
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user