Commit graph

6 commits

Author SHA1 Message Date
jedarden
88e890c5cd fix(tests): integration tests skip gracefully when Docker unavailable
- Add check_docker_available() to integration.rs and docker_compose_integration.rs
- Add skip_if_no_miroir! macro for graceful test skipping
- Fix helm_schema_rejects_local_backend_with_replicas_gt_1 test path
- Fix uninlined format args for clippy compliance
- Fix unused variable warning in p10_2_node_master_key_rotation.rs
- Add #[allow] attributes for unused code in p10_5_scoped_key_rotation.rs

Resolves: bf-1lyu5 (integration tests skip gracefully)
Resolves: bf-e0595 (Phase 10 acceptance tests - p10_7 fix)

All 1777 tests pass when Docker is unavailable.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 14:42:28 -04:00
jedarden
b660334a1e fix(tests): allow docker-compose integration tests to skip gracefully when Docker unavailable
Add MIROIR_TEST_SKIP_DOCKER and MIROIR_TEST_MIROIR_URL environment variables
to allow docker-compose integration tests to run without Docker or use external Miroir.

Changes:
- Modified HttpClient::new() to accept base_url parameter
- Added get_miroir_base_url() to support external Miroir via MIROIR_TEST_MIROIR_URL
- Added skip_if_no_miroir!() macro for graceful test skipping
- Tests now skip with clear message when Docker unavailable
- Updated docs/TESTING.md with docker-compose test environment documentation

Acceptance criteria met:
✓ Tests skip gracefully when Docker unavailable (MIROIR_TEST_SKIP_DOCKER=1)
✓ Tests can run against external Miroir instance (MIROIR_TEST_MIROIR_URL)
✓ Test setup documented in docs/TESTING.md
✓ All docker_compose_integration tests pass with skip flag

Fixes bead bf-3a6dx: Fix docker-compose integration tests

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 13:56:25 -04:00
jedarden
4777bb6834 fix(cli): add --version and --help flags to miroir-proxy
Adds clap-based CLI argument parsing so `miroir-proxy --version`
and `miroir-proxy --help` print version/usage and exit instead
of starting the server and hanging.

Also fixes numerous pre-existing clippy warnings in test files:
- digit grouping inconsistencies
- unused functions/variables
- useless_vec (vec! -> array)
- assert!(true) placeholders
- too_many_arguments

Resolves: bf-31ff
2026-05-26 03:02:56 -04:00
jedarden
b7f3546c01 fix(clippy): auto-fix format strings and deprecated IndexMap::remove
- Run cargo clippy --fix to apply uninlined format args suggestions
- Fix deprecated IndexMap::remove calls in session_pinning.rs (use shift_remove)
- Various test and source files updated by clippy auto-fix

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 21:31:17 -04:00
jedarden
158752fe7b feat(multi-search): implement timeout enforcement and acceptance tests (§13.11)
- Add per-query and total timeout enforcement to MultiSearchExecutor
- Improve SearchResult with helper methods (ok, err, timeout, is_success)
- Fix ModeACoordinator feature-gate compilation issues
- Add comprehensive acceptance tests for multi-search:
  - 5-query batch completion
  - Slow query doesn't block fast queries (parallel execution)
  - Partial failure handling
  - Per-query timeout
  - Total timeout
  - 100-query batch completion

Closes: miroir-uhj.11
2026-05-24 01:54:20 -04:00
jedarden
7bbf8f1061 P9.2: Integration test harness with docker-compose
Add comprehensive integration test infrastructure:
- docker-compose-dev.yml: 3 Meilisearch nodes + Miroir (RG=1, RF=1, S=16)
- docker-compose-dev-rf2.yml: 6 Meilisearch nodes + Redis + Miroir (RG=2, RF=2)
- dev-config.yaml/dev-config-rf2.yaml: Configurations for both stacks
- Integration tests in crates/miroir-proxy/tests/docker_compose_integration.rs
- Documentation in crates/miroir-proxy/tests/README_integration.md
- CI workflow in k8s/argo-workflows/miroir-ci-docker-compose-smoke.yaml

Test coverage (plan §8):
- Document round-trip (1000 docs)
- Search coverage across all 16 shards
- Facet aggregation
- Offset/limit pagination
- Settings broadcast
- Task polling
- Health checks
- Node failure with RF=2

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 07:33:34 -04:00
Renamed from tests/integration.rs (Browse further)