ci,lint: fix lint issues and add TestSubnetToSubnetACL to workflow

Updates #3157
This commit is contained in:
Kristoffer Dalby
2026-04-12 21:39:27 +00:00
parent c278418b94
commit cad0cb2f5c
3 changed files with 8 additions and 5 deletions
+1
View File
@@ -249,6 +249,7 @@ jobs:
- TestAutoApproveMultiNetwork/webauth-group.*
- TestSubnetRouteACLFiltering
- TestGrantViaSubnetSteering
- TestSubnetToSubnetACL
- TestHeadscale
- TestTailscaleNodesJoiningHeadcale
- TestSSHOneUserToAll
+3 -3
View File
@@ -49,15 +49,15 @@ func CommentHeader(c *Capture) string {
}
if !c.CapturedAt.IsZero() {
b.WriteString(fmt.Sprintf("Captured at: %s\n", c.CapturedAt.UTC().Format("2006-01-02T15:04:05Z")))
fmt.Fprintf(&b, "Captured at: %s\n", c.CapturedAt.UTC().Format("2006-01-02T15:04:05Z"))
}
if c.ToolVersion != "" {
b.WriteString(fmt.Sprintf("tscap version: %s\n", c.ToolVersion))
fmt.Fprintf(&b, "tscap version: %s\n", c.ToolVersion)
}
if c.SchemaVersion != 0 {
b.WriteString(fmt.Sprintf("schema version: %d\n", c.SchemaVersion))
fmt.Fprintf(&b, "schema version: %d\n", c.SchemaVersion)
}
return strings.TrimRight(b.String(), "\n")
+4 -2
View File
@@ -3495,8 +3495,8 @@ func TestGrantViaSubnetSteering(t *testing.T) {
}
// TestSubnetToSubnetACL verifies that when ACL rules reference only subnet
// CIDRs as source and destination, the subnet routers for those subnets
// see each other as peers and exchange routes, enabling end-to-end
// CIDRs as source and destination, the subnet routers for those subnets see
// each other as peers and exchange routes, enabling end-to-end
// connectivity between the two physical subnets.
//
// This is a regression test for https://github.com/juanfont/headscale/issues/3157
@@ -3522,6 +3522,7 @@ func TestSubnetToSubnetACL(t *testing.T) {
scenario, err := NewScenario(spec)
require.NoErrorf(t, err, "failed to create scenario: %s", err)
defer scenario.ShutdownAssertNoPanics(t)
prefA, err := scenario.SubnetOfNetwork("usernet1")
@@ -3592,6 +3593,7 @@ func TestSubnetToSubnetACL(t *testing.T) {
// Wait for advertisements to propagate.
var nodes []*v1.Node
assert.EventuallyWithT(t, func(c *assert.CollectT) {
nodes, err = headscale.ListNodes()
assert.NoError(c, err)