继续优化代码
This commit is contained in:
@@ -57,6 +57,7 @@ def _print_full_usage() -> None:
|
|||||||
print(" python main.py logs [--limit N] [--status s] [--task-type t] [--target-id tid]")
|
print(" python main.py logs [--limit N] [--status s] [--task-type t] [--target-id tid]")
|
||||||
print(" python main.py log-get <log_id>")
|
print(" python main.py log-get <log_id>")
|
||||||
print(" python main.py health")
|
print(" python main.py health")
|
||||||
|
print(" python main.py config-path")
|
||||||
print(" python main.py version")
|
print(" python main.py version")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ class TestConfigBootstrap(unittest.TestCase):
|
|||||||
with open(path, "w", encoding="utf-8") as f:
|
with open(path, "w", encoding="utf-8") as f:
|
||||||
f.write("# empty user\n")
|
f.write("# empty user\n")
|
||||||
config.reset_cache()
|
config.reset_cache()
|
||||||
self.assertEqual(
|
with open(example, encoding="utf-8") as f:
|
||||||
config.get("OPENCLAW_TEST_TARGET", "simulator_rpa"),
|
example_text = f.read()
|
||||||
config.get("OPENCLAW_TEST_TARGET") or "simulator_rpa",
|
self.assertIn("OPENCLAW_TEST_TARGET=simulator_rpa", example_text)
|
||||||
)
|
self.assertEqual(config.get("OPENCLAW_TEST_TARGET"), "simulator_rpa")
|
||||||
|
|
||||||
def test_config_path_outputs_json(self) -> None:
|
def test_config_path_outputs_json(self) -> None:
|
||||||
with IsolatedDataRoot(user_id="_cfg_path"):
|
with IsolatedDataRoot(user_id="_cfg_path"):
|
||||||
|
|||||||
Reference in New Issue
Block a user