From 733fa116382ffb126026e462b060ea3eba895770 Mon Sep 17 00:00:00 2001 From: aitbc Date: Sun, 19 Apr 2026 20:22:17 +0200 Subject: [PATCH] test: update CLI blockchain command test to use block query instead of info Changed test from 'blockchain info' to 'blockchain block --number 1' and added verification for "Block #1" in output. Also improved error output to include stdout when stderr is empty. --- cli/tests/run_cli_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/tests/run_cli_tests.py b/cli/tests/run_cli_tests.py index c510babb..24ece3d0 100755 --- a/cli/tests/run_cli_tests.py +++ b/cli/tests/run_cli_tests.py @@ -54,12 +54,12 @@ def run_cli_test(): # Test 3: CLI blockchain command print("\n3. Testing CLI blockchain command...") try: - result = run_command("blockchain", "info") + result = run_command("blockchain", "block", "--number", "1") - if result.returncode == 0: + if result.returncode == 0 and "Block #1" in result.stdout: print("✅ CLI blockchain command working") else: - print(f"❌ CLI blockchain command failed: {result.stderr}") + print(f"❌ CLI blockchain command failed: {result.stderr or result.stdout}") return False except Exception as e: print(f"❌ CLI blockchain command error: {e}")