mirror of
https://github.com/juanfont/headscale.git
synced 2025-09-16 17:50:44 +02:00
policy: validate error message for asterix in ssh (#2766)
This commit is contained in:
parent
3f6657ae57
commit
01c1f6f82a
@ -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",
|
name: "invalid-username",
|
||||||
input: `
|
input: `
|
||||||
|
Loading…
Reference in New Issue
Block a user