We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa055bd commit 2f57b56Copy full SHA for 2f57b56
internal/sync/templating/naming_test.go
@@ -86,6 +86,14 @@ func TestGenerateLocalObjectName(t *testing.T) {
86
namingConfig: &syncagentv1alpha1.ResourceNaming{Name: "foobar-$remoteName"},
87
expected: types.NamespacedName{Namespace: "testcluster", Name: "foobar-objname"},
88
},
89
+ {
90
+ name: "Go templates",
91
+ clusterName: "testcluster",
92
+ clusterPath: "root:test:team",
93
+ remoteObject: createNewObject("objname", "objnamespace"),
94
+ namingConfig: &syncagentv1alpha1.ResourceNaming{Name: "{{ .ClusterPath }}-{{ .Object.metadata.name }}"},
95
+ expected: types.NamespacedName{Namespace: "testcluster", Name: "root:test:team-objname"},
96
+ },
97
}
98
99
for _, testcase := range testcases {
0 commit comments