Imported from zhoudongchao9-cloud/blueprint-repl (
crates/qos/tests/AGENTS.md). Install upstream withnpx skills add zhoudongchao9-cloud/blueprint-repl --skill tests. Copyright stays with the author.
tests
Purpose
Integration tests for the blueprint-qos crate, validating QoS metrics collection, gRPC service endpoints, blueprint integration with the runner, and resource monitoring in end-to-end scenarios using Anvil testnets.
Contents (one hop)
Subdirectories
-
config/- Test configuration files:prometheus.ymlfor Prometheus scrape targets used in integration tests
Files
blueprint_integration_test.rs- End-to-end integration test that deploys a blueprint on an Anvil testnet with QoS services (heartbeat, metrics, gRPC), exercises theQosMetricsClientfor status/resource/blueprint queries, and validates the full QoS lifecycledefault_metrics_provider_tests.rs- Tests for the default metrics provider implementationqos_metrics_demo_test.rs- Demonstration test for QoS metrics collectionutils.rs- Shared test utilities:XSQUARE_JOB_IDconstant,squarejob handler,MockHeartbeatConsumerfor recording heartbeats, gRPC client helpers
Key APIs (no snippets)
square- Minimal job handler used across QoS integration testsMockHeartbeatConsumer- Records heartbeat status for test assertions- Test helper functions for gRPC client setup
Relationships
- Depends on
blueprint-qos(the crate under test) - Depends on
blueprint-anvil-testing-utilsforBlueprintHarnessandSeededTangleTestnet - Depends on
blueprint-tangle-extraforTangleArg/TangleResultextractors andTangleLayer - Uses tonic gRPC clients to validate the
QosMetricsServiceendpoints
