From 7699585c89d5231afc7e71db8fa026d2c819659c Mon Sep 17 00:00:00 2001
From: xuyan wang <35394786+wayyoungboy@users.noreply.github.com>
Date: Thu, 12 Dec 2024 16:44:54 +0800
Subject: [PATCH] add inner_config_dev_path & obdiag list command fix (#622)

* move code

* move code

* move code

* add inner_config_dev_path
---
 src/common/config.py              | 7 ++++++-
 src/handler/checker/check_list.py | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/common/config.py b/src/common/config.py
index 20e63462..77690afe 100644
--- a/src/common/config.py
+++ b/src/common/config.py
@@ -29,7 +29,12 @@
     absPath = os.path.dirname(os.path.abspath(sys.executable))
 else:
     absPath = os.path.dirname(os.path.abspath(__file__))
-INNER_CONFIG_FILE = os.path.join(absPath, "../../conf/inner_config.yml")
+inner_config_release_path = os.path.join(absPath, "conf/inner_config.yml")
+inner_config_dev_path = os.path.join(absPath, "../../conf/inner_config.yml")
+if os.path.exists(inner_config_release_path):
+    INNER_CONFIG_FILE = inner_config_release_path
+else:
+    INNER_CONFIG_FILE = inner_config_dev_path
 
 DEFAULT_CONFIG_DATA = '''
 obcluster:
diff --git a/src/handler/checker/check_list.py b/src/handler/checker/check_list.py
index d60a5377..eb5decb5 100644
--- a/src/handler/checker/check_list.py
+++ b/src/handler/checker/check_list.py
@@ -37,7 +37,7 @@ def handle(self):
             result_map = {}
             for file in files:
                 if "check_package" in file:
-                    cases_map = {"all": {"name": "all", "command": "obdiag check", "info_en": "default check all task without filter", "info_cn": "默认执行除filter组里的所有巡检项"}}
+                    cases_map = {"all": {"name": "all", "command": "obdiag check run", "info_en": "default check all task without filter", "info_cn": "默认执行除filter组里的所有巡检项"}}
                     # Obtain which files match and corresponding header files
                     # Using string segmentation methods
                     parts = file.split('_')