fix(cli): align --url validation error message with test expectations
CI / build (pull_request) Successful in 42s
CI / lint (pull_request) Successful in 1m1s
CI / quality (pull_request) Successful in 1m4s
CI / typecheck (pull_request) Successful in 1m7s
CI / security (pull_request) Successful in 1m16s
CI / helm (pull_request) Successful in 26s
CI / push-validation (pull_request) Successful in 32s
CI / unit_tests (pull_request) Successful in 6m32s
CI / docker (pull_request) Successful in 1m36s
CI / coverage (pull_request) Successful in 13m55s
CI / integration_tests (pull_request) Successful in 27m19s
CI / status-check (pull_request) Successful in 3s

The Behave test expected the error message to contain '--url is only valid
for git resources' but the code was producing '--url only for git resources'.
Updated the validation error message to match the test assertion.

Also updated the Robot Framework integration test to expect the corrected
message, ensuring consistency across both test suites.

Fixes the failing Behave scenario: 'Using --url with a non-git resource type
is rejected' by correcting the error message text output from the CLI.

ISSUES CLOSED: #6322
This commit is contained in:
2026-05-31 17:10:35 -04:00
parent ca55d565b6
commit fcc780bf1b
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -53,4 +53,4 @@ Git Resource Add URL Flag Validation Rejects Non Git Types
... timeout=120s on_timeout=kill stderr=STDOUT
Log ${result.stdout}
Should Not Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} --url only for git resources
Should Contain ${result.stdout} --url is only valid for git resources
+2 -1
View File
@@ -699,7 +699,8 @@ def resource_add(
if url is not None:
if type_name != "git":
console.print(
"[red]Validation error:[/red] --url only for git resources."
"[red]Validation error:[/red] "
"--url is only valid for git resources."
)
raise typer.Abort()
url_value = url.strip()