Commit graph

6 commits

Author SHA1 Message Date
Jon Seager
42d0f71eb1
feat!: use numeric, database-generated IDs throughout 2025-11-25 18:21:04 +00:00
copilot-swe-agent[bot]
d290ac8528
refactor(test): clean up CLI test helpers and improve code clarity
Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:46 +00:00
copilot-swe-agent[bot]
1747a77a83
refactor(test): simplify CLI tests with shared server and remove unused TestApp helpers
- Remove unused post/put/delete/get helper methods from TestApp
- Create shared test server instance for all CLI tests using once_cell
- Use API directly to create tokens for testing (avoids interactive CLI issues)
- Simplify CLI test structure with server_info() and create_token() helpers
- Update all CLI tests to use shared server infrastructure
- Server tests (42 tests) still pass 

Note: CLI tests have stdin handling issues with interactive create-token command.
Using API directly for token creation in tests as workaround.

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:45 +00:00
copilot-swe-agent[bot]
d50ea10012
fix(test): improve CLI test infrastructure with proper JSON parsing and token extraction
- Fix create_token helper to properly parse interactive output and extract token
- Update roasters_cli tests to parse JSON output and verify roaster data
- Update roasts_cli tests to parse JSON output and verify roast data
- Use BREWLOG_SERVER environment variable instead of --server flag
- Add proper assertions on JSON structure and content

Note: CLI tests currently fail due to server startup timing issues when
running multiple tests concurrently. Server tests (42 tests) all pass.
CLI test infrastructure is functional but needs serial execution or
better port management.

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:43 +00:00
copilot-swe-agent[bot]
34d5b157fe
fix(test): replace fixed sleep with health check polling in CLI test server startup
Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:15 +00:00
copilot-swe-agent[bot]
94c2403370
test(cli): add initial CLI test infrastructure
- Create tests/cli directory with test modules for roasters, roasts, and tokens
- Add helper functions for spawning test servers and running CLI commands
- Add portpicker and tempfile dev dependencies for CLI tests
- Tests demonstrate expected behavior but need CLI refinements to fully work:
  * CLI commands need --server flag or better env variable handling
  * create-token needs non-interactive mode for testing
  * Commands should support --json output format for easier parsing

Infrastructure is ready for completion once CLI improvements are made

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:14 +00:00