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
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:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user