Skip to content

test(cli): add env-gated scenario/integration tests mirroring SDK manifest #129

@zfarrell

Description

@zfarrell

Mirror the shared scenario manifest at /Users/zacfarrell/Projects/hotdata/www.hotdata.dev/api/test-scenarios.yaml into CLI integration tests under tests/<scenario>.rs (or binary-driven equivalents). The manifest is the source of truth; decide whether to extend it with a CLI surface or keep CLI scenarios as a CLI-local mirror.

Adopt the same env-gated skip-without-creds pattern used by sdk-python and sdk-rust: read HOTDATA_SDK_TEST_API_KEY / HOTDATA_SDK_TEST_WORKSPACE_ID / HOTDATA_SDK_TEST_API_URL (default https://api.hotdata.dev) / HOTDATA_SDK_TEST_CONNECTION_ID, treating empty strings as absent (GH Actions sets empty env: keys). Use skip_if_no_creds! / skip_if_no_connection!-style macros that early-return with SKIP <module>: ... on stderr so cargo test passes offline. Reuse the sdkci-<scenario>-<uuid8> resource naming and find-or-create-shared-database pattern from sdk-rust/tests/common/mod.rs.

Cover the 11 scenarios: datasets_crud, workspaces_list, connections_read, dataset_versioning, saved_query_versioning, query_async_polling, results_arrow, indexes_lifecycle (needs a seeded indexable table), secrets_crud, auth_missing_token_401, auth_unknown_workspace. Deferred per locked decision 4 — this lands as a follow-up to the SDK refactor and is not part of the SDK-refactor PR.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions