forked from HAL9000/cleveragents-core
8ea00f5185
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
42 lines
2.2 KiB
Plaintext
42 lines
2.2 KiB
Plaintext
*** Settings ***
|
|
Documentation TDD Issue #1024 — SQLite DB URL resolves to CWD instead of CLEVERAGENTS_HOME
|
|
... Integration tests verifying that the database URL resolves
|
|
... inside CLEVERAGENTS_HOME rather than the current working
|
|
... directory. The default ``database_url`` in Settings is
|
|
... ``sqlite:///cleveragents.db`` — a relative path that resolves
|
|
... against CWD, breaking test isolation when CLEVERAGENTS_HOME
|
|
... points to a different directory.
|
|
...
|
|
... Bug: https://git.cleverthis.com/cleveragents/cleveragents-core/issues/1024
|
|
... TDD: https://git.cleverthis.com/cleveragents/cleveragents-core/issues/1034
|
|
Resource ${CURDIR}/common.resource
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${HELPER} ${CURDIR}/helper_tdd_sqlite_url_cwd.py
|
|
|
|
*** Test Cases ***
|
|
TDD SQLite DB URL Resolves Inside CLEVERAGENTS_HOME
|
|
[Documentation] Verify that ``get_database_url()`` resolves the database
|
|
... path inside CLEVERAGENTS_HOME when no explicit database URL
|
|
... is provided via environment variable.
|
|
[Tags] tdd_issue tdd_issue_1024 tdd_issue tdd_issue_4320 tdd_expected_fail
|
|
|
|
${result}= Run Process ${PYTHON} ${HELPER} check-db-url-resolution cwd=${WORKSPACE} timeout=60s on_timeout=kill
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} tdd-sqlite-url-cwd-resolution-ok
|
|
|
|
TDD CLI Command Creates DB Inside CLEVERAGENTS_HOME
|
|
[Documentation] Verify that a CLI command (session list) creates the
|
|
... database file inside CLEVERAGENTS_HOME, not in CWD.
|
|
[Tags] tdd_issue tdd_issue_1024 tdd_issue tdd_issue_4320 tdd_expected_fail
|
|
|
|
${result}= Run Process ${PYTHON} ${HELPER} check-cli-db-location cwd=${WORKSPACE} timeout=60s on_timeout=kill
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} tdd-sqlite-url-cwd-cli-ok
|