From 16d96f0ab4d026dd382dbac89dc3305ee5b8060e Mon Sep 17 00:00:00 2001 From: riccardom Date: Wed, 23 Sep 2026 12:06:32 +0200 Subject: [PATCH] [client] Assert against the stored config, not a resolved default (review item) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The login-gate test read the profile back with ReadOrGenerateConfig, which resolves a default config in memory when the file is missing — and that default's management URL is the very value the assertion checks. An erased or mislocated profile would have passed the test instead of failing it. The file is written by the test itself, so GetExistingConfig is the right reader: it errors when the file is gone. Reported by cubic on the PR. --- client/server/login_gate_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/server/login_gate_test.go b/client/server/login_gate_test.go index 2ca550b3c..17ae3ecad 100644 --- a/client/server/login_gate_test.go +++ b/client/server/login_gate_test.go @@ -93,7 +93,7 @@ func TestLogin_ChangeThatBecomesPrivilegedMidRequestHasNoSideEffects(t *testing. require.NoError(t, err) require.Equal(t, profilemanager.ID(activeProfile), active.ID, "the refused login switched the active profile anyway") - stored, err := profilemanager.ReadOrGenerateConfig(targetPath) + stored, err := profilemanager.GetExistingConfig(targetPath) require.NoError(t, err) require.Equal(t, "https://api.netbird.io:443", stored.ManagementURL.String(), "the refused login moved the management URL") }