Fix path join (#5762)

This commit is contained in:
Zoltan Papp
2026-04-01 13:21:19 +02:00
committed by GitHub
parent 5ae986e1c4
commit 4d3e2f8ad3

View File

@@ -25,10 +25,10 @@ func TestServiceParamsPath(t *testing.T) {
t.Cleanup(func() { configs.StateDir = original }) t.Cleanup(func() { configs.StateDir = original })
configs.StateDir = "/var/lib/netbird" configs.StateDir = "/var/lib/netbird"
assert.Equal(t, "/var/lib/netbird/service.json", serviceParamsPath()) assert.Equal(t, filepath.Join("/var/lib/netbird", "service.json"), serviceParamsPath())
configs.StateDir = "/custom/state" configs.StateDir = "/custom/state"
assert.Equal(t, "/custom/state/service.json", serviceParamsPath()) assert.Equal(t, filepath.Join("/custom/state", "service.json"), serviceParamsPath())
} }
func TestSaveAndLoadServiceParams(t *testing.T) { func TestSaveAndLoadServiceParams(t *testing.T) {