Skip to content

Commit

Permalink
Cleanup set-namespace output message (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed Apr 18, 2022
1 parent dd9952c commit 5e430f6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
10 changes: 0 additions & 10 deletions functions/go/set-namespace/transformer/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ func SetNamespace(rl *fn.ResourceList) (bool, error) {
}

rl.Results = append(rl.Results, result)
rl.Results = append(rl.Results, &fn.Result{
Message: fmt.Sprintf("set image from %s to %s", tc.NamespaceMatcher, tc.NewNamespace),
Field: &fn.Field{
Path: "",
CurrentValue: tc.NamespaceMatcher,
ProposedValue: tc.NewNamespace,
},
File: &fn.File{Path: "test", Index: 0},
Severity: fn.Info,
})
return true, nil
}

Expand Down
9 changes: 1 addition & 8 deletions tests/set-namespace/ns-unset/.expected/results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,4 @@ items:
exitCode: 0
results:
- message: could not find any namespace fields to update. This function requires at least one of Namespace objects or namespace-scoped resources to have their namespace field set.
severity: error
- message: set image from to example-ns
severity: info
field:
currentValue: ""
proposedValue: example-ns
file:
path: test
severity: error

0 comments on commit 5e430f6

Please sign in to comment.