Access Control: Add test flag to enable access control (#46780)

* Add feature flags options to test db
This commit is contained in:
Karl Persson
2022-03-22 20:48:32 +01:00
committed by GitHub
parent 552b447946
commit ee9badecdf
6 changed files with 47 additions and 33 deletions
+2 -5
View File
@@ -396,8 +396,7 @@ func TestSQLStore_SearchTeams(t *testing.T) {
},
}
store := InitTestDB(t)
store.Cfg.IsFeatureToggleEnabled = featuremgmt.WithFeatures(featuremgmt.FlagAccesscontrol).IsEnabled
store := InitTestDB(t, InitTestDBOpt{FeatureFlags: []string{featuremgmt.FlagAccesscontrol}})
// Seed 10 teams
for i := 1; i <= 10; i++ {
@@ -456,9 +455,7 @@ func TestSQLStore_GetTeamMembers_ACFilter(t *testing.T) {
require.NoError(t, errAddMember)
}
store := InitTestDB(t)
store.Cfg.IsFeatureToggleEnabled = featuremgmt.WithFeatures(featuremgmt.FlagAccesscontrol).IsEnabled
store := InitTestDB(t, InitTestDBOpt{FeatureFlags: []string{featuremgmt.FlagAccesscontrol}})
setup(store)
type getTeamMembersTestCase struct {