From 77a7813f0e55c3872c2409cd6b00281aa2ecfbc1 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Fri, 13 Mar 2026 23:59:08 +0000 Subject: [PATCH] fix(test): tighten diagnostics check exit code assertion in CLI core test Replace the tolerant "rc == 0 or rc == 1" assertion with a strict "rc == 0" check for the diagnostics --check command. In a clean test environment, diagnostics should complete without finding errors, and the previous assertion could not distinguish a legitimate diagnostic failure from a command crash. --- robot/cli_core.robot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/robot/cli_core.robot b/robot/cli_core.robot index e9a158e66..54db72b23 100644 --- a/robot/cli_core.robot +++ b/robot/cli_core.robot @@ -102,9 +102,9 @@ Diagnostics Command Plain Format Should Contain ${result.stdout} summary: Diagnostics Command Check Flag Returns Valid Exit Code - [Documentation] Diagnostics --check exits 0 (no errors) or 1 (has errors) without crashing + [Documentation] Diagnostics --check exits 0 when no errors are found ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --check --format json timeout=60s - Should Be True ${result.rc} == 0 or ${result.rc} == 1 Unexpected exit code: ${result.rc} + Should Be Equal As Integers ${result.rc} 0 Diagnostics --check failed with rc=${result.rc}: ${result.stdout} Should Contain ${result.stdout} "checks" Should Contain ${result.stdout} "has_errors" -- 2.52.0