mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Isolate scalar quoting oddities to one test set.
The apimachinery code path, in its final marshalling for output, calls Marshall https://github.com/go-yaml/yaml/blob/v2/yaml.go#L199 This code path (via apimachinery Unstructured types) has no JSON schema tags https://yaml.org/spec/1.2/spec.html#id2803311 so it adds quotes to values that smell like booleans and ints (e.g. `false` becomes `"false"`). The kyaml code path, OTOH, uses such tags, so generally does not quote ints and booleans. This PR isolates this difference in behavior to one set of tests (using data fields in configmaps in api/krusty/configmaps_test.go) so that they don't confuse other tests that cover completely different behaviors.
This commit is contained in:
@@ -70,12 +70,6 @@ func (th Harness) MakeDefaultOptions() krusty.Options {
|
||||
return th.MakeOptionsPluginsDisabled()
|
||||
}
|
||||
|
||||
func (th Harness) MakeDefaultOptionsWithProperEnableKyaml() krusty.Options {
|
||||
o := th.MakeOptionsPluginsDisabled()
|
||||
o.UseKyaml = konfig.FlagEnableKyamlDefaultValue
|
||||
return o
|
||||
}
|
||||
|
||||
// This has no impact on Builtin plugins, as they are always enabled.
|
||||
func (th Harness) MakeOptionsPluginsDisabled() krusty.Options {
|
||||
return *krusty.MakeDefaultOptions()
|
||||
|
||||
Reference in New Issue
Block a user