From 753c92eea55cfcb2b6cb6af88f14ee2037cb2eeb Mon Sep 17 00:00:00 2001 From: eweziyi Date: Tue, 21 Jan 2025 18:03:07 +0800 Subject: [PATCH] Remove redundant argument --- treatment-service/appcontext/appcontext.go | 1 - treatment-service/appcontext/appcontext_test.go | 1 - treatment-service/integration-test/fetch_treatment_it_test.go | 2 +- treatment-service/models/storage.go | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/treatment-service/appcontext/appcontext.go b/treatment-service/appcontext/appcontext.go index e74c1fb..d574aa7 100644 --- a/treatment-service/appcontext/appcontext.go +++ b/treatment-service/appcontext/appcontext.go @@ -32,7 +32,6 @@ func NewAppContext(cfg *config.Config) (*AppContext, error) { localStorage, err := models.NewLocalStorage( cfg.GetProjectIds(), cfg.ManagementService.URL, - cfg.ManagementService.AuthorizationEnabled, cfg.DeploymentConfig.GoogleApplicationCredentialsEnvVar, ) if err != nil { diff --git a/treatment-service/appcontext/appcontext_test.go b/treatment-service/appcontext/appcontext_test.go index 172e309..734d6d5 100644 --- a/treatment-service/appcontext/appcontext_test.go +++ b/treatment-service/appcontext/appcontext_test.go @@ -78,7 +78,6 @@ func TestContext(t *testing.T) { localStorage, err := models.NewLocalStorage( testConfig.GetProjectIds(), testConfig.ManagementService.URL, - testConfig.ManagementService.AuthorizationEnabled, "", ) if err != nil { diff --git a/treatment-service/integration-test/fetch_treatment_it_test.go b/treatment-service/integration-test/fetch_treatment_it_test.go index 76f8b2d..6a43f7c 100644 --- a/treatment-service/integration-test/fetch_treatment_it_test.go +++ b/treatment-service/integration-test/fetch_treatment_it_test.go @@ -807,7 +807,7 @@ func (suite *TreatmentServiceTestSuite) TestAllFiltersSwitchback() { } func (suite *TreatmentServiceTestSuite) TestLocalStorage() { - storage, err := models.NewLocalStorage([]models.ProjectId{1}, suite.managementServiceServer.URL, false, "") + storage, err := models.NewLocalStorage([]models.ProjectId{1}, suite.managementServiceServer.URL, "") suite.Require().NoError(err) suite.Require().NotEmpty(storage) diff --git a/treatment-service/models/storage.go b/treatment-service/models/storage.go index acaf713..1b95981 100644 --- a/treatment-service/models/storage.go +++ b/treatment-service/models/storage.go @@ -561,7 +561,6 @@ func (s *LocalStorage) getAllProjects() ([]*pubsub.ProjectSettings, error) { func NewLocalStorage( projectIds []ProjectId, xpServer string, - authzEnabled bool, googleApplicationCredentialsEnvVar string, ) (*LocalStorage, error) { // Set up Request Modifiers