mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: remove IsDisabled method for access control (#74340)
remove IsDisabled method for access control, clean up tests
This commit is contained in:
@@ -502,7 +502,7 @@ func TestRouteGetRuleStatuses(t *testing.T) {
|
||||
log: log.NewNopLogger(),
|
||||
manager: fakeAIM,
|
||||
store: ruleStore,
|
||||
ac: acmock.New().WithDisabled(),
|
||||
ac: acmock.New(),
|
||||
}
|
||||
|
||||
response := api.RouteGetRuleStatuses(c)
|
||||
|
||||
@@ -271,7 +271,7 @@ func TestRouteEvalQueries(t *testing.T) {
|
||||
|
||||
func createTestingApiSrv(t *testing.T, ds *fakes.FakeCacheService, ac *acMock.Mock, evaluator eval.EvaluatorFactory) *TestingApiSrv {
|
||||
if ac == nil {
|
||||
ac = acMock.New().WithDisabled()
|
||||
ac = acMock.New()
|
||||
}
|
||||
|
||||
return &TestingApiSrv{
|
||||
|
||||
@@ -60,7 +60,7 @@ func TestAlertingProxy_createProxyContext(t *testing.T) {
|
||||
|
||||
t.Run("should create a copy of request context", func(t *testing.T) {
|
||||
for _, mock := range []*accesscontrolmock.Mock{
|
||||
accesscontrolmock.New(), accesscontrolmock.New().WithDisabled(),
|
||||
accesscontrolmock.New(), accesscontrolmock.New(),
|
||||
} {
|
||||
proxy := AlertingProxy{
|
||||
DataProxy: nil,
|
||||
|
||||
Reference in New Issue
Block a user