EventManager: breaking change for placeholder names

Placeholder names must now be in the format:

{{.VirtualPath}}

instead of:

{{.VirtualPath}}

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2025-04-13 20:01:03 +02:00
parent 1cf0ed5b7e
commit 0da8adb7ac
12 changed files with 576 additions and 187 deletions

View File

@@ -1182,18 +1182,18 @@ func TestOIDCEvMgrIntegration(t *testing.T) {
// add a special chars to check json replacer
username := `test_"oidc_eventmanager`
u := map[string]any{
"username": "{{Name}}",
"username": "{{.Name}}",
"status": 1,
"home_dir": filepath.Join(os.TempDir(), "{{IDPFieldcustom1.sub}}"),
"home_dir": filepath.Join(os.TempDir(), "{{.IDPFieldcustom1.sub}}"),
"permissions": map[string][]string{
"/": {dataprovider.PermAny},
},
"description": "{{IDPFieldcustom2}}",
"description": "{{.IDPFieldcustom2}}",
}
userTmpl, err := json.Marshal(u)
require.NoError(t, err)
a := map[string]any{
"username": "{{Name}}",
"username": "{{.Name}}",
"status": 1,
"permissions": []string{dataprovider.PermAdminAny},
}