mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 00:52:55 +00:00
Added code for fields with dots(.) in their names work as needed (#4591)
* Added code for fields with dots(.) in their names work as needed Co-authored-by: sarjamil <sjamil@salesforce.com> * Fixed imports Co-authored-by: sarjamil <sjamil@salesforce.com> * Removed comments Co-authored-by: sarjamil <sjamil@salesforce.com> * Fix filter method Co-authored-by: sarjamil <sjamil@salesforce.com> * Fixed failing tests Co-authored-by: sarjamil <sjamil@salesforce.com> * Remove comments Add co-author to PR. Co-authored-by: sarjamil <sjamil@salesforce.com> * Add co-author to PR. Co-authored-by: sarjamil sjamil@salesforce.com Co-authored-by: sarjamil <sjamil@salesforce.com>
This commit is contained in:
@@ -2310,8 +2310,6 @@ func TestGetAnnotations(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetFieldValueWithDot(t *testing.T) {
|
||||
t.Skip()
|
||||
|
||||
const input = `
|
||||
kind: Pod
|
||||
metadata:
|
||||
@@ -2330,8 +2328,6 @@ metadata:
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "hello-world-app", app)
|
||||
|
||||
// TODO: doesn't currently work; we expect to be able to escape the dot in future
|
||||
// https://github.com/kubernetes-sigs/kustomize/issues/4487
|
||||
fooAppName, err := labelRNode.GetFieldValue(`foo\.appname`)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "hello-world-foo", fooAppName) // no field named 'foo.appname'
|
||||
|
||||
Reference in New Issue
Block a user