mirror of
https://github.com/juanfont/headscale.git
synced 2025-09-25 17:51:11 +02:00
mapper: fix test with new derp init
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
5e9788475f
commit
e82b001ce6
@ -10,6 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/juanfont/headscale/hscontrol/db"
|
"github.com/juanfont/headscale/hscontrol/db"
|
||||||
|
"github.com/juanfont/headscale/hscontrol/derp"
|
||||||
"github.com/juanfont/headscale/hscontrol/state"
|
"github.com/juanfont/headscale/hscontrol/state"
|
||||||
"github.com/juanfont/headscale/hscontrol/types"
|
"github.com/juanfont/headscale/hscontrol/types"
|
||||||
"github.com/juanfont/headscale/hscontrol/types/change"
|
"github.com/juanfont/headscale/hscontrol/types/change"
|
||||||
@ -167,6 +168,12 @@ func setupBatcherWithTestData(t *testing.T, bf batcherFunc, userCount, nodesPerU
|
|||||||
t.Fatalf("Failed to create state: %v", err)
|
t.Fatalf("Failed to create state: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
derpMap, err := derp.GetDERPMap(cfg.DERP)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
assert.NotNil(t, derpMap)
|
||||||
|
|
||||||
|
state.SetDERPMap(derpMap)
|
||||||
|
|
||||||
// Set up a permissive policy that allows all communication for testing
|
// Set up a permissive policy that allows all communication for testing
|
||||||
allowAllPolicy := `{
|
allowAllPolicy := `{
|
||||||
"acls": [
|
"acls": [
|
||||||
|
Loading…
Reference in New Issue
Block a user