policy: validate error message for asterix in ssh (#2766)
Some checks failed
Build / build-nix (push) Has been cancelled
Build / build-cross (GOARCH=amd64 GOOS=darwin) (push) Has been cancelled
Build / build-cross (GOARCH=amd64 GOOS=linux) (push) Has been cancelled
Build / build-cross (GOARCH=arm64 GOOS=darwin) (push) Has been cancelled
Build / build-cross (GOARCH=arm64 GOOS=linux) (push) Has been cancelled
Check Generated Files / check-generated (push) Has been cancelled
Tests / test (push) Has been cancelled
Close inactive issues / close-issues (push) Has been cancelled

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: `