feat(cli): add resource commands (core)
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 28s
CI / security (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 5m11s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 14m31s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 8m18s
CI / lint (push) Successful in 13s
CI / typecheck (push) Successful in 28s
CI / security (push) Successful in 23s
CI / quality (push) Successful in 16s
CI / integration_tests (push) Successful in 4m58s
CI / build (push) Successful in 15s
CI / unit_tests (push) Successful in 15m30s
CI / coverage (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 28s
CI / security (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 5m11s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 14m31s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 8m18s
CI / lint (push) Successful in 13s
CI / typecheck (push) Successful in 28s
CI / security (push) Successful in 23s
CI / quality (push) Successful in 16s
CI / integration_tests (push) Successful in 4m58s
CI / build (push) Successful in 15s
CI / unit_tests (push) Successful in 15m30s
CI / coverage (push) Has been cancelled
CI / docker (push) Has been cancelled
This commit was merged in pull request #71.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
*** 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)
|
||||
... result = svc.bootstrap_builtin_types()
|
||||
... assert "git-checkout" in result
|
||||
... assert "fs-directory" in result
|
||||
... 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
|
||||
Reference in New Issue
Block a user