Skip to content

Comments

Add e2e tests for bundled CLI#1

Merged
KeKs0r merged 2 commits intomainfrom
KeKs0r/e2e-cli-tests
Feb 18, 2026
Merged

Add e2e tests for bundled CLI#1
KeKs0r merged 2 commits intomainfrom
KeKs0r/e2e-cli-tests

Conversation

@KeKs0r
Copy link
Contributor

@KeKs0r KeKs0r commented Feb 18, 2026

Summary

  • Adds bun build --compile step producing a standalone dist/chcli binary
  • Adds 8 e2e tests that build the binary then run it against a real ClickHouse instance (SELECT, JSON/CSV/TSV/markdown formats, stdin piping, file input, --time flag, SHOW DATABASES, system.numbers)
  • Adds test:env script wrapping tests with doppler run for local dev
  • Exposes CLICKHOUSE_* secrets in CI workflow (synced from doppler chcli/ci config)
  • Documents rule: tests requiring env vars must FAIL, never skip

Test plan

  • bun run test:env passes locally (25 tests: 17 unit + 8 e2e)
  • CI workflow runs with ClickHouse secrets and all tests pass

🤖 Generated with Claude Code

KeKs0r and others added 2 commits February 18, 2026 16:28
- Add build script (bun build --compile) producing dist/chcli binary
- Add e2e test suite that builds then runs 8 tests against the compiled
  binary with a real ClickHouse connection
- Add test:env script wrapping tests with doppler for local dev
- Expose CLICKHOUSE_* secrets in CI workflow
- Document that tests requiring env vars must fail, never skip

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use || instead of ?? for env var defaults so empty strings
(from missing GitHub secrets) fall through to defaults.
Remove CLICKHOUSE_USER from CI env since it's not in doppler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KeKs0r KeKs0r merged commit 8a92153 into main Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant