test-hfs

Plan and run cargo tests across the Helios HFS Rust workspace.

51|19|Updated Jan 4, 2025
One-click install
npx skills add https://github.com/HeliosSoftware/hfs --skill test-hfs-heliossoftware
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-hfs
Source: https://github.com/HeliosSoftware/hfs/tree/main/.agents/skills/test-hfs
Command: npx skills add https://github.com/HeliosSoftware/hfs --skill test-hfs-heliossoftware

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working in the Helios HFS Rust workspace need to know which cargo test commands, feature flags, and infrastructure setups apply to each crate, and this Skill consolidates that testing knowledge in one place. ## Core Features & Use Cases - Test Command Selection: Provides cargo test invocations for the full workspace, individual crates like helios-sof and helios-fhirpath, name patterns, and specific test targets. - Integration Test Guidance: Documents testcontainers-based PostgreSQL and Elasticsearch testing, including shared containers via tokio OnceCell, UUID-based tenant isolation, and Elasticsearch JVM heap caps. - Use Case: When a persistence integration test fails, use this Skill to confirm Docker is required, check that containers are shared per test binary, and verify test data isolation with unique tenant IDs. ## Quick Start Ask how to run the SQL-on-FHIR integration tests with all FHIR versions enabled in the HFS workspace.

Frequently Asked Questions about test-hfs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run tests for a specific crate in a Rust workspace?▼

Run cargo test with the -p flag followed by the crate name, such as cargo test -p helios-sof or cargo test -p helios-fhirpath. You can also filter by test name pattern or target a specific test file with --test.

How to run Rust tests with multiple feature flags enabled?▼

Pass the features comma-separated to the --features flag, for example cargo test --features R4,R4B,R5,R6. This runs the test suite against all supported FHIR versions in the HFS workspace.

Do testcontainers integration tests require Docker?▼

Yes, the persistence integration tests use testcontainers to spin up PostgreSQL and Elasticsearch, so Docker must be running. Containers are shared per test binary using tokio::sync::OnceCell to avoid repeated startup costs.

How do I isolate test data in shared database containers?▼

Use unique UUID-based prefixes or tenant IDs for each test instead of spinning up separate containers. This keeps tests isolated while reusing one PostgreSQL or Elasticsearch container per test binary.

Why is my Elasticsearch test container running out of memory?▼

Elasticsearch defaults to a large JVM heap that can exhaust resources in CI or local runs. Cap it by setting ES_JAVA_OPTS=-Xms256m -Xmx256m on the test container.

Where is FHIR test data located in the HFS workspace?▼

FHIR example resources live in crates/fhir/tests/data/, and search parameter definitions are in data/search-parameters-{r4,r4b,r5,r6}.json. Official FHIRPath test cases come from the fhir-test-cases repository.