From b39925f5764c725c768f82c3dda19df63d8077b0 Mon Sep 17 00:00:00 2001 From: ArcticLampyrid Date: Sun, 17 Nov 2024 01:47:30 +0800 Subject: [PATCH] tests: fix `TestDERPVerifyEndpoint` --- integration/derp_verify_endpoint_test.go | 4 ++-- integration/hsic/hsic.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integration/derp_verify_endpoint_test.go b/integration/derp_verify_endpoint_test.go index 6be5927a..adad5b6a 100644 --- a/integration/derp_verify_endpoint_test.go +++ b/integration/derp_verify_endpoint_test.go @@ -33,10 +33,10 @@ func TestDERPVerifyEndpoint(t *testing.T) { scenario, err := NewScenario(dockertestMaxWait()) assertNoErr(t, err) - defer scenario.Shutdown() + defer scenario.ShutdownAssertNoPanics(t) spec := map[string]int{ - "user1": 10, + "user1": len(MustTestVersions), } derper, err := scenario.CreateDERPServer("head", diff --git a/integration/hsic/hsic.go b/integration/hsic/hsic.go index 3b4d0905..8c379dc8 100644 --- a/integration/hsic/hsic.go +++ b/integration/hsic/hsic.go @@ -25,6 +25,7 @@ import ( "github.com/juanfont/headscale/integration/integrationutil" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" + "gopkg.in/yaml.v3" "tailscale.com/tailcfg" ) @@ -221,7 +222,7 @@ func WithEmbeddedDERPServerOnly() Option { // DERP server only. func WithDERPConfig(derpMap tailcfg.DERPMap) Option { return func(hsic *HeadscaleInContainer) { - contents, err := json.Marshal(derpMap) + contents, err := yaml.Marshal(derpMap) if err != nil { log.Fatalf("failed to marshal DERP map: %s", err)