Skip to content

test: keep integration test output pristine - #13

Merged
aeddi merged 10 commits into
mainfrom
tests-use-private-key-copies
Nov 4, 2026
Merged

aeddi merged 10 commits into
mainfrom
tests-use-private-key-copies

Conversation

@aeddi

@aeddi aeddi commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Every integration run printed the KMS's key-permission and fresh-state warnings, its routine
INFO lines and the stop-height errors two tests provoke on purpose. A run now prints only test
results: no test KMS's log reaches the terminal, and anything a healthy test KMS logs fails the
test:

  • Each test KMS gets owner-only copies of the key fixtures, which git stores as 0644, and a
    state file seeded the way the KMS would create it. Neither warning fires.
  • Every test KMS logs to a file at warn level. A healthy test fails if either of its KMS logged
    anything.
  • The stop-height tests assert that the KMS drops the request, exits with status 1 and logs the
    stop-height error. They used a bare #[should_panic], which any panic satisfied.
  • A KMS that dies fails its test at once, and one that stalls before connecting or answering
    fails it within two 10s waits. Either way the test prints the KMS's log instead of hanging.
  • A dedicated test checks that both warnings still fire for a readable key and a missing state
    file. The warnings themselves are unchanged.

Changes

  • Hand each test KMS owner-only copies of its key fixtures — 3e68d50
  • Seed the state file each test KMS loads — ce69f99
  • Assert why the KMS refuses to sign above max_height; the UNIX test config gets reconnect = false, as the TCP one has, so the KMS exits after refusing — 53a874f
  • Run each test KMS at warn level — e6ca34a
  • Fail any test whose healthy KMS logs anything — 6ef2f0b
  • Fail fast, with the KMS log, when a test KMS dies or stalls — df120f7
  • Check that a KMS still warns about a readable key and a missing state file — d4d4d71
  • Name the test KMS directory for all it holds — 844dfde
  • Update the verification counts in FORK.md — 4cf858c, 2dc784b

Testing

  • cargo test --all-features -- --test-threads 1 prints nothing but results on stable and on
    1.85: 68 unit + 28 integration tests pass (10 ignored, all hardware-dependent). 20 serial and
    5 parallel integration runs had no failures and no other output.
  • Each new assertion was checked against a mutant that it fails:
    • a KMS that signs above max_height, exits 0 after refusing, or logs a different error;
    • a warn! on every sign request, or no warn-level filter;
    • a KMS that dies, or stalls before connecting or answering (fails with its log, within two
      10s waits for a stall);
    • either warning removed;
    • a key copy left at 0644, or a state file left unseeded.

@aeddi
aeddi merged commit 67d6e65 into main Nov 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant