Repository navigation
test(it): add integration test harness on the compose cluster - #58
Open
JasMehta08 wants to merge 1 commit into
Open
JasMehta08 wants to merge 1 commit into
JasMehta08 wants to merge 1 commit into
Conversation
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.
What
Adds the integration test harness from the test strategy (#31): a
satchel-itcrate whose tests drive the running Compose cluster over HTTP, a script that runs them locally, and a CI job that runs them on every PR.Closes #32
Why
Week 3 build issues need somewhere to put tests that cross services, and a PR that breaks a service should fail CI. This mirrors Magic Pocket, where releases go through integration tests with failure injection before they move on [B3].
crates/satchel-it. The config helper is insrc/lib.rs, the tests are intests/cluster.rs.cargo test --workspace: the tests are#[ignore]d and run withcargo test -p satchel-it -- --ignored. If the cluster isn't there they fail with "connection refused" for each service, they never pass silently.ureqwith default features off (plain HTTP, no TLS, no OpenSSL). It's a dev-dependency, so the Docker image build doesn't compile it. Pinned to 3.4.2 in the lock file.docker-compose.yml, read fromdocker compose config, so nothing needs changing when docs(design): finalize the exercise plan with RS(6,3) on 9 nodes #56's 9-node cluster lands. A declared service that's down fails the tests instead of being skipped.SATCHEL_IT_<SERVICE>_URLoverrides it (for exampleSATCHEL_IT_NODE_Z1_URL), so the same suite can point at the AWS cluster later. Readiness polls/healthfor up to 60 s (SATCHEL_IT_READY_TIMEOUT_SECS), with no fixed sleeps.ts_svc_1_all_services_healthyandts_node_4_nodes_report_their_zone. A failure lists every broken service with its URL and what it returned.satchel:devonce, then rundocker compose up -d --waitwithout--build.docker-compose.ymlitself is unchanged.How to check it
"satchel-api"to anything else incrates/satchel-api/src/main.rsand run the script. It fails with:api at http://localhost:8080/health: expected service "satchel-api" with status "ok", got {"service":"satchel-broken",...}Once the job has passed on
maina few times, I'll ask @frectrium to make it a required check.Checklist
cargo fmt,cargo clippyandcargo testpass locally (code PRs)docs/sources/README.md(research PRs)