mirror of
https://github.com/juanfont/headscale.git
synced 2025-02-20 00:18:41 +01:00
run route integration tests offline
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
404eb53092
commit
ff96ac5259
@ -262,7 +262,11 @@ func TestHASubnetRouterFailover(t *testing.T) {
|
|||||||
user: 3,
|
user: 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = scenario.CreateHeadscaleEnv(spec, []tsic.Option{}, hsic.WithTestName("clienableroute"))
|
err = scenario.CreateHeadscaleEnv(spec, []tsic.Option{},
|
||||||
|
hsic.WithTestName("clienableroute"),
|
||||||
|
hsic.WithEmbeddedDERPServerOnly(),
|
||||||
|
hsic.WithTLS(),
|
||||||
|
)
|
||||||
assertNoErrHeadscaleEnv(t, err)
|
assertNoErrHeadscaleEnv(t, err)
|
||||||
|
|
||||||
allClients, err := scenario.ListTailscaleClients()
|
allClients, err := scenario.ListTailscaleClients()
|
||||||
@ -966,7 +970,7 @@ func TestAutoApprovedSubRoute2068(t *testing.T) {
|
|||||||
|
|
||||||
expectedRoutes := "10.42.7.0/24"
|
expectedRoutes := "10.42.7.0/24"
|
||||||
|
|
||||||
user := "subroute"
|
user := "user1"
|
||||||
|
|
||||||
scenario, err := NewScenario(dockertestMaxWait())
|
scenario, err := NewScenario(dockertestMaxWait())
|
||||||
assertNoErrf(t, "failed to create scenario: %s", err)
|
assertNoErrf(t, "failed to create scenario: %s", err)
|
||||||
@ -976,25 +980,29 @@ func TestAutoApprovedSubRoute2068(t *testing.T) {
|
|||||||
user: 1,
|
user: 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = scenario.CreateHeadscaleEnv(spec, []tsic.Option{tsic.WithTags([]string{"tag:approve"})}, hsic.WithTestName("clienableroute"), hsic.WithACLPolicy(
|
err = scenario.CreateHeadscaleEnv(spec, []tsic.Option{tsic.WithTags([]string{"tag:approve"})},
|
||||||
&policy.ACLPolicy{
|
hsic.WithTestName("clienableroute"),
|
||||||
ACLs: []policy.ACL{
|
hsic.WithEmbeddedDERPServerOnly(),
|
||||||
{
|
hsic.WithTLS(),
|
||||||
Action: "accept",
|
hsic.WithACLPolicy(
|
||||||
Sources: []string{"*"},
|
&policy.ACLPolicy{
|
||||||
Destinations: []string{"*:*"},
|
ACLs: []policy.ACL{
|
||||||
|
{
|
||||||
|
Action: "accept",
|
||||||
|
Sources: []string{"*"},
|
||||||
|
Destinations: []string{"*:*"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
TagOwners: map[string][]string{
|
||||||
|
"tag:approve": {user},
|
||||||
|
},
|
||||||
|
AutoApprovers: policy.AutoApprovers{
|
||||||
|
Routes: map[string][]string{
|
||||||
|
"10.42.0.0/16": {"tag:approve"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
TagOwners: map[string][]string{
|
))
|
||||||
"tag:approve": {user},
|
|
||||||
},
|
|
||||||
AutoApprovers: policy.AutoApprovers{
|
|
||||||
Routes: map[string][]string{
|
|
||||||
"10.42.0.0/16": {"tag:approve"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
))
|
|
||||||
assertNoErrHeadscaleEnv(t, err)
|
assertNoErrHeadscaleEnv(t, err)
|
||||||
|
|
||||||
allClients, err := scenario.ListTailscaleClients()
|
allClients, err := scenario.ListTailscaleClients()
|
||||||
|
Loading…
Reference in New Issue
Block a user