Merge pull request #2162 from grafana/dev

get rid of need for FEATURE_PROMETHEUS_EXPORTER_ENABLED to be present in ci-test.py settings file
This commit is contained in:
Joey Orlando 2023-06-12 15:44:12 +02:00 committed by GitHub
commit ae6e03dd55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,5 @@
import pytest
from django.test import override_settings
from django.urls import reverse
from rest_framework.test import APIClient
@ -12,7 +13,10 @@ from rest_framework.test import APIClient
("secret", "secret", 200),
],
)
def test_metrics_exporter_auth(settings, token, auth, expected):
@override_settings(FEATURE_PROMETHEUS_EXPORTER_ENABLED=True)
def test_metrics_exporter_auth(settings, reload_urls, token, auth, expected):
reload_urls()
settings.PROMETHEUS_EXPORTER_SECRET = token
client = APIClient()

View file

@ -40,5 +40,3 @@ TWILIO_ACCOUNT_SID = "dummy_twilio_account_sid"
TWILIO_AUTH_TOKEN = "dummy_twilio_auth_token"
EXTRA_MESSAGING_BACKENDS = [("apps.base.tests.messaging_backend.TestOnlyBackend", 42)]
FEATURE_PROMETHEUS_EXPORTER_ENABLED = True