Chore: prepare for removing RBACenabled config option (#73845)

prepare for removing RBACenabled config option
This commit is contained in:
Ieva
2023-08-25 17:13:46 +02:00
committed by GitHub
parent 31e29de024
commit ca46a5c1af
6 changed files with 16 additions and 39 deletions
@@ -24,7 +24,6 @@ import (
func setupTestEnv(t testing.TB) *Service {
t.Helper()
cfg := setting.NewCfg()
cfg.RBACEnabled = true
ac := &Service{
cfg: cfg,
@@ -41,12 +40,10 @@ func setupTestEnv(t testing.TB) *Service {
func TestUsageMetrics(t *testing.T) {
tests := []struct {
name string
enabled bool
expectedValue int
}{
{
name: "Expecting metric with value 1",
enabled: true,
expectedValue: 1,
},
}
@@ -54,7 +51,6 @@ func TestUsageMetrics(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cfg := setting.NewCfg()
cfg.RBACEnabled = tt.enabled
s := ProvideOSSService(
cfg,