policy: validate error message for asterix in ssh (#2766)

This commit is contained in:
Kristoffer Dalby
2025-09-10 18:41:43 +02:00
committed by GitHub
parent 3f6657ae57
commit 01c1f6f82a

View File

@@ -348,6 +348,42 @@ func TestUnmarshalPolicy(t *testing.T) {
},
},
},
{
name: "2652-asterix-error-better-explain",
input: `
{
"acls": [
{
"action": "accept",
"src": [
"*"
],
"dst": [
"*:*"
],
"proto": [
"*:*"
]
}
],
"ssh": [
{
"action": "accept",
"src": [
"*"
],
"dst": [
"*"
],
"proto": [
"*:*"
]
}
]
}
`,
wantErr: "alias v2.Asterix is not supported for SSH source",
},
{
name: "invalid-username",
input: `