Skip to content

Commit 6c5e9c0

Browse files
rkuo-danswerRichard Kuo (Onyx)
andauthored
add test (#4676)
* add test * comment --------- Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
1 parent 7965fd9 commit 6c5e9c0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

backend/tests/integration/multitenant_tests/tenants/test_tenant_creation.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
from http import HTTPStatus
2+
3+
import requests
4+
15
from onyx.configs.constants import DocumentSource
26
from onyx.db.enums import AccessType
37
from onyx.db.models import UserRole
8+
from tests.integration.common_utils.constants import API_SERVER_URL
49
from tests.integration.common_utils.managers.cc_pair import CCPairManager
510
from tests.integration.common_utils.managers.connector import ConnectorManager
611
from tests.integration.common_utils.managers.credential import CredentialManager
@@ -80,3 +85,11 @@ def test_admin_can_create_and_verify_cc_pair(reset_multitenant: None) -> None:
8085

8186
# Verify cc_pair
8287
CCPairManager.verify(cc_pair=test_cc_pair, user_performing_action=test_user)
88+
89+
90+
def test_settings_access() -> None:
91+
"""Calls to the enterprise settings endpoint without authentication should fail with
92+
403 (and not 500, which will lock the web UI into a "maintenance mode" page)"""
93+
94+
response = requests.get(url=f"{API_SERVER_URL}/enterprise-settings")
95+
assert response.status_code == HTTPStatus.FORBIDDEN

0 commit comments

Comments
 (0)