Skip to content

Commit 666cf4e

Browse files
authored
[api][conf] Refactor API tests and configuration handling (#4181)
- Enhanced the configuration retrieval in the API to include new flags for sharing and usage collection. This fixes bug of hue_config present ClusterConfig getting overridden. - Removed redundant configuration entries from the ClusterConfig model. - Reorganized import statements for consistency and clarity. - Updated test cases to check for all config fields, improve readability and maintainability, including adjustments to JSON handling and assertions.
1 parent a3c23ab commit 666cf4e

File tree

3 files changed

+388
-353
lines changed

3 files changed

+388
-353
lines changed

desktop/core/src/desktop/api2.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
from desktop import appmanager
4242
from desktop.auth.backend import is_admin
4343
from desktop.conf import (
44+
COLLECT_USAGE,
4445
CUSTOM,
4546
ENABLE_CHUNKED_FILE_UPLOADER,
4647
ENABLE_CONNECTORS,
@@ -148,6 +149,8 @@ def get_config(request):
148149
'enable_task_server': TASK_SERVER_V2.ENABLED.get(),
149150
'enable_workflow_creation_action': ENABLE_WORKFLOW_CREATION_ACTION.get(),
150151
'allow_sample_data_from_views': ALLOW_SAMPLE_DATA_FROM_VIEWS.get(),
152+
'enable_sharing': ENABLE_SHARING.get(),
153+
'collect_usage': COLLECT_USAGE.get(),
151154
}
152155

153156
# Storage browser configuration

0 commit comments

Comments
 (0)