fcc780bf1b
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
57 lines
3.0 KiB
Plaintext
57 lines
3.0 KiB
Plaintext
*** Settings ***
|
|
Library Process
|
|
Library OperatingSystem
|
|
Library String
|
|
Suite Setup Set Environment Variables
|
|
Suite Teardown Clean Up Test Database
|
|
Test Tags resource_cli
|
|
|
|
*** Variables ***
|
|
${DB_URL} sqlite:///build/test_resource_cli.db
|
|
|
|
*** Keywords ***
|
|
Set Environment Variables
|
|
Set Environment Variable CLEVERAGENTS_DATABASE_URL ${DB_URL}
|
|
Set Environment Variable CLEVERAGENTS_TESTING_USE_MOCK_AI true
|
|
${script}= Set Variable from cleveragents.infrastructure.database.models import Base; from sqlalchemy import create_engine; e \= create_engine("${DB_URL}"); Base.metadata.create_all(e)
|
|
${result}= Run Process ${PYTHON} -c ${script}
|
|
... env:PYTHONPATH=src timeout=120s on_timeout=kill
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
|
|
Clean Up Test Database
|
|
Remove File build/test_resource_cli.db
|
|
|
|
*** Test Cases ***
|
|
Resource Type List Returns Output
|
|
[Documentation] Verify resource type list command runs without error
|
|
${result}= Run Process ${PYTHON} -m cleveragents resource type list
|
|
... env:PYTHONPATH=src env:CLEVERAGENTS_DATABASE_URL=${DB_URL} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true
|
|
... timeout=120s on_timeout=kill stderr=STDOUT
|
|
Log ${result.stdout}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
|
|
Resource Show Non Existent Returns Error
|
|
[Documentation] Verify resource show for non-existent resource fails gracefully
|
|
${result}= Run Process ${PYTHON} -m cleveragents resource show nonexistent
|
|
... env:PYTHONPATH=src env:CLEVERAGENTS_DATABASE_URL=${DB_URL} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true
|
|
... timeout=120s on_timeout=kill stderr=STDOUT
|
|
Log ${result.stdout}
|
|
Should Not Be Equal As Integers ${result.rc} 0
|
|
|
|
Git Resource Add With URL Flag Succeeds
|
|
[Documentation] Verify git resource can be added with --url flag
|
|
${result}= Run Process ${PYTHON} -m cleveragents resource add git test-upstream --url git@github.com:test/repo.git
|
|
... env:PYTHONPATH=src env:CLEVERAGENTS_DATABASE_URL=${DB_URL} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true
|
|
... timeout=120s on_timeout=kill stderr=STDOUT
|
|
Log ${result.stdout}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
|
|
Git Resource Add URL Flag Validation Rejects Non Git Types
|
|
[Documentation] Verify --url flag is rejected for non-git resource types
|
|
${result}= Run Process ${PYTHON} -m cleveragents resource add local test-local --url /some/path
|
|
... env:PYTHONPATH=src env:CLEVERAGENTS_DATABASE_URL=${DB_URL} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true
|
|
... timeout=120s on_timeout=kill stderr=STDOUT
|
|
Log ${result.stdout}
|
|
Should Not Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} --url is only valid for git resources
|