FeatureFlags: Avoid using cfg.IsFeatureToggleEnabled (#81407)
This commit is contained in:
@@ -154,9 +154,7 @@ func TestMigrations(t *testing.T) {
|
||||
desc: "with editors can admin",
|
||||
config: &setting.Cfg{
|
||||
EditorsCanAdmin: true,
|
||||
// nolint:staticcheck
|
||||
IsFeatureToggleEnabled: func(key string) bool { return key == "accesscontrol" },
|
||||
Raw: ini.Empty(),
|
||||
Raw: ini.Empty(),
|
||||
},
|
||||
expectedRolePerms: map[string][]rawPermission{
|
||||
"managed:users:1:permissions": {{Action: "teams:read", Scope: team1Scope}},
|
||||
@@ -262,9 +260,6 @@ func setupTestDB(t *testing.T) *xorm.Engine {
|
||||
mg := migrator.NewMigrator(x, &setting.Cfg{
|
||||
Logger: log.New("acmigration.test"),
|
||||
Raw: ini.Empty(),
|
||||
IsFeatureToggleEnabled: func(key string) bool {
|
||||
return true
|
||||
},
|
||||
})
|
||||
migrations := &migrations.OSSMigrations{}
|
||||
migrations.AddMigration(mg)
|
||||
|
||||
Reference in New Issue
Block a user