mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-09 13:39:39 -05:00
derp: increase update frequency and harden on failures (#2741)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/juanfont/headscale/hscontrol/db"
|
||||
"github.com/juanfont/headscale/hscontrol/derp"
|
||||
"github.com/juanfont/headscale/hscontrol/state"
|
||||
"github.com/juanfont/headscale/hscontrol/types"
|
||||
"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)
|
||||
}
|
||||
|
||||
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
|
||||
allowAllPolicy := `{
|
||||
"acls": [
|
||||
|
||||
Reference in New Issue
Block a user