mirror of
https://github.com/juanfont/headscale.git
synced 2025-07-22 13:48:40 +02:00
cleanup skipv1
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
05b7dbe5e9
commit
e385bad554
@ -60,7 +60,6 @@ func TestNodeCanApproveRoute(t *testing.T) {
|
|||||||
route netip.Prefix
|
route netip.Prefix
|
||||||
policy string
|
policy string
|
||||||
canApprove bool
|
canApprove bool
|
||||||
skipV1 bool
|
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "allow-all-routes-for-admin-user",
|
name: "allow-all-routes-for-admin-user",
|
||||||
@ -789,13 +788,7 @@ func TestNodeCanApproveRoute(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i, pm := range policyManagers {
|
for i, pm := range policyManagers {
|
||||||
versionNum := i + 1
|
t.Run(fmt.Sprintf("policy-index%d", i), func(t *testing.T) {
|
||||||
if versionNum == 1 && tt.skipV1 {
|
|
||||||
// Skip V1 policy manager for specific tests
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
t.Run(fmt.Sprintf("PolicyV%d", versionNum), func(t *testing.T) {
|
|
||||||
result := pm.NodeCanApproveRoute(&tt.node, tt.route)
|
result := pm.NodeCanApproveRoute(&tt.node, tt.route)
|
||||||
|
|
||||||
if diff := cmp.Diff(tt.canApprove, result); diff != "" {
|
if diff := cmp.Diff(tt.canApprove, result); diff != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user