瀏覽代碼

[api] Rename 'config_error_list' to 'config_errors' in check_config API response (#4019)

Harsh Gupta 9 月之前
父節點
當前提交
ac14e98fd5
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      desktop/core/src/desktop/api2.py
  2. 1 1
      desktop/core/src/desktop/api2_tests.py

+ 1 - 1
desktop/core/src/desktop/api2.py

@@ -1485,7 +1485,7 @@ def check_config(request):
   """Returns the configuration directory and the list of validation errors."""
   response = {
     'hue_config_dir': os.path.realpath(os.getenv("HUE_CONF_DIR", get_desktop_root("conf"))),
-    'config_error_list': _get_config_errors(request, cache=False),
+    'config_errors': _get_config_errors(request, cache=False),
   }
 
   return JsonResponse(response)

+ 1 - 1
desktop/core/src/desktop/api2_tests.py

@@ -868,7 +868,7 @@ class TestCheckConfigAPI:
         assert response.status_code == 200
         assert response_data == {
           "hue_config_dir": "/test/hue/conf",
-          "config_error_list": [
+          "config_errors": [
             {"name": "Hive", "message": "The application won't work without a running HiveServer2."},
             {"name": "Impala", "message": "No available Impalad to send queries to."},
             {"name": "Spark", "message": "The app won't work without a running Livy Spark Server"},