test(api): resolve #977 #972 #971 #968 — testing & observability hardening#1022
Open
vitalis200 wants to merge 1 commit into
Open
test(api): resolve #977 #972 #971 #968 — testing & observability hardening#1022vitalis200 wants to merge 1 commit into
vitalis200 wants to merge 1 commit into
Conversation
…ug#971 solutions-plug#968 — testing & observability hardening - solutions-plug#977: add proptest property-based tests for all validation functions (empty, over-max-len, all-whitespace, null bytes, control chars, Unicode, valid inputs); CI runs 1000 cases per property via PROPTEST_CASES=1000 - solutions-plug#972: add transaction-rollback DB fixture (with_test_transaction) so each integration test is isolated; CI verifies order-independence with two different nextest random seeds - solutions-plug#971: add docker-compose.test.yml (Postgres 15, Redis 7, Stellar RPC stub) with health checks; add Makefile targets (test-integration, test-integration-down); wire CI job api-integration-tests - solutions-plug#968: validate OTEL_EXPORTER_OTLP_ENDPOINT as a parseable URL at startup (fail-fast on bad config); TCP connectivity check with 2 s timeout logs WARN if unreachable; otel_export_errors_total Prometheus counter tracks failures; document OTLP config in TRACING.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@vitalis200 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
closes #977** — Property-based tests for all validation functions (
sanitize_string,validate_string) usingproptest: covers empty input, over-max-length, all-whitespace collapse, null bytes, control characters, Unicode homographs, and valid pass-through. CI runs ≥1 000 cases per property viaPROPTEST_CASES=1000.with_test_transaction) intests/common/db_fixture.rsso every integration test is isolated regardless of execution order. CI job runs the suite twice with differentnextestrandom seeds to enforce order-independence.closes Integration tests have no Docker Compose setup — require pre-existing external services #971** —
docker-compose.test.ymlprovisions Postgres 15, Redis 7, and a Stellar RPC stub with health checks.make test-integrationstarts the stack, runs tests, and tears down. CI jobapi-integration-testsuses this stack. Setup documented inCONTRIBUTING.md.closes OTLP exporter endpoint not validated at startup — invalid URL fails silently #968**
closes #968 —
OTEL_EXPORTER_OTLP_ENDPOINTis validated as a parseable URL at startup (fail-fast). A TCP connectivity check (2 s timeout) logsWARNif the collector is unreachable and incrementsotel_export_errors_total{reason="unreachable"}. Documented inTRACING.md.Test plan
PROPTEST_CASES=1000 cargo test prop_— all 7 property tests passmake test-integration— starts compose stack, runs integration tests, tears down cleanlycargo nextest run --rand-rng-seed=1and--rand-rng-seed=2produce identical resultsOTEL_EXPORTER_OTLP_ENDPOINT=not-a-url— service exits at startup with a clear errorOTEL_EXPORTER_OTLP_ENDPOINT=http://unreachable:4317— service starts, logs WARN,otel_export_errors_totalincrements🤖 Generated with Claude Code