64cfdc782a
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 18s
CI / security (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 51s
CI / unit_tests (pull_request) Successful in 2m20s
CI / docker (pull_request) Successful in 38s
CI / integration_tests (pull_request) Successful in 3m12s
CI / coverage (pull_request) Successful in 4m30s
CI / lint (push) Successful in 13s
CI / quality (push) Successful in 16s
CI / build (push) Successful in 15s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 34s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 3m45s
CI / docker (push) Successful in 41s
CI / integration_tests (push) Successful in 4m34s
CI / coverage (push) Successful in 4m36s
CI / benchmark-publish (push) Successful in 16m13s
CI / benchmark-regression (pull_request) Successful in 28m59s
Add a call to bootstrap_builtin_types() in init_command() (project.py) immediately after initialize_project() returns. This seeds the built-in resource types (fs-directory, git-checkout, etc.) into the database so that "resource add" commands succeed without "Resource type not found" errors. The call is idempotent — invoking it multiple times will not create duplicate types. Also fix the TDD robot test (resource_type_bootstrap_git.robot) to initialize a project before running "resource add", and fix a pre-existing parallel test failure in plan_commands_new_coverage where unittest.mock.patch could not reliably intercept PlanApplyService under behave-parallel fork() workers. ISSUES CLOSED: #523, #524
48 lines
2.2 KiB
Plaintext
48 lines
2.2 KiB
Plaintext
*** Settings ***
|
|
Documentation Smoke tests for resource registry and project services
|
|
Library Process
|
|
Library OperatingSystem
|
|
|
|
*** Variables ***
|
|
${PYTHON} python
|
|
|
|
*** Test Cases ***
|
|
Resource Registry Service Module Is Importable
|
|
[Documentation] Verify the resource registry service module can be imported
|
|
${result}= Run Process ${PYTHON} -c
|
|
... from cleveragents.application.services.resource_registry_service import ResourceRegistryService\nprint("OK")
|
|
... env:PYTHONPATH=src
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} OK
|
|
|
|
Resource Registry Bootstrap Creates Built-in Types
|
|
[Documentation] Verify bootstrap registers built-in types using in-memory DB
|
|
${script}= Catenate SEPARATOR=\n
|
|
... from sqlalchemy import create_engine
|
|
... from sqlalchemy.orm import sessionmaker
|
|
... from cleveragents.infrastructure.database.models import Base
|
|
... from cleveragents.application.services.resource_registry_service import ResourceRegistryService
|
|
... engine = create_engine("sqlite:///:memory:")
|
|
... Base.metadata.create_all(engine)
|
|
... sf = sessionmaker(bind=engine)
|
|
... svc = ResourceRegistryService(session_factory=sf)
|
|
... types = [t.name for t in svc.list_types()]
|
|
... assert "git-checkout" in types, f"git-checkout not in {types}"
|
|
... assert "fs-directory" in types, f"fs-directory not in {types}"
|
|
... print("PASS")
|
|
${result}= Run Process ${PYTHON} -c ${script} env:PYTHONPATH=src
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} PASS
|
|
|
|
DI Container Provides Resource Registry Service
|
|
[Documentation] Verify the DI container wires ResourceRegistryService
|
|
${script}= Catenate SEPARATOR=\n
|
|
... from cleveragents.application.container import Container
|
|
... c = Container()
|
|
... svc = c.resource_registry_service()
|
|
... assert type(svc).__name__ == "ResourceRegistryService"
|
|
... print("PASS")
|
|
${result}= Run Process ${PYTHON} -c ${script} env:PYTHONPATH=src
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} PASS
|