diff --git a/application/server/execute_command_test.go b/application/server/execute_command_test.go index cd1b3d37d..fdae0c1d3 100644 --- a/application/server/execute_command_test.go +++ b/application/server/execute_command_test.go @@ -149,10 +149,10 @@ func Test_loginCommand_StartsAuthentication(t *testing.T) { assert.Eventually(t, func() bool { return len(jsonRPCRecorder.Notifications()) > 0 }, 5*time.Second, 50*time.Millisecond) notifications := jsonRPCRecorder.FindNotificationsByMethod("$/snyk.hasAuthenticated") assert.Equal(t, 1, len(notifications)) - var hasAuthencticatedNotification types.AuthenticationParams - err = notifications[0].UnmarshalParams(&hasAuthencticatedNotification) + var hasAuthenticatedNotification types.AuthenticationParams + err = notifications[0].UnmarshalParams(&hasAuthenticatedNotification) assert.NoError(t, err) - assert.NotEmpty(t, hasAuthencticatedNotification.ApiUrl) + assert.NotEmpty(t, hasAuthenticatedNotification.ApiUrl) } func Test_TrustWorkspaceFolders(t *testing.T) { diff --git a/infrastructure/authentication/auth_service_impl.go b/infrastructure/authentication/auth_service_impl.go index fb3b527f8..63477c9c7 100644 --- a/infrastructure/authentication/auth_service_impl.go +++ b/infrastructure/authentication/auth_service_impl.go @@ -81,7 +81,7 @@ func (a *AuthenticationServiceImpl) Authenticate(ctx context.Context) (token str prioritizedUrl := getPrioritizedApiUrl(customUrl, engineUrl) if prioritizedUrl != customUrl { - a.notifier.SendShowMessage(sglsp.Info, "The Snyk API Endpoint has been updated.") + defer a.notifier.SendShowMessage(sglsp.Info, "The Snyk API Endpoint has been updated.") } a.c.UpdateApiEndpoints(prioritizedUrl)