Skip to content

Add integration tests (offline + relay tiers) and CI - #15

Merged
kwsantiago merged 2 commits into
mainfrom
feat/integration-tests
Jun 19, 2026
Merged

kwsantiago merged 2 commits into
mainfrom
feat/integration-tests

Conversation

@kwsantiago

@kwsantiago kwsantiago commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Black-box integration tests for noz, modeled on wisp's chk expected actual harness. Two tiers.

Offline tier (tests/integration_offline.sh, 15 assertions)

No relay needed; runs in the existing build job on Linux + macOS after zig build test.

  • key: key public derives the secp256k1 generator pubkey; key generate emits 64-hex sec/pub.
  • decode: npub/note/nsec/nprofile NIP-19 vectors; garbage exits non-zero.
  • verify: round-trips a sign-only event (arg + stdin); tampered content -> id mismatch + exit 1; malformed -> exit 1.
  • event sign-only embeds the author pubkey.

Relay tier (tests/integration_relay.sh + tests/integration_sync.sh, 14 assertions)

New integration CI job clones + builds wisp (pinned v0.5.3) as the relay fixture, starts two instances, and runs noz against them. The reciprocal of wisp's CI, which already uses noz as its protocol-test client.

  • round-trip (11): publish then REQ by id / author / kind / #t tag; wrong-kind, future-since, past-until are empty; NIP-45 COUNT; a fetched event passes verify; NIP-11 doc has name + supported_nips.
  • NIP-77 sync (3): publish to relay A, confirm absent on B, noz sync A B, confirm present on B.

Verified

CI green on all three checks: build (ubuntu + macos) with the offline tier, and the integration job (wisp built from source, relay + sync tiers 14/14).

Closes #4.

@kwsantiago kwsantiago mentioned this pull request Jun 19, 2026
@kwsantiago kwsantiago changed the title Add offline integration test harness Add integration tests (offline + relay tiers) and CI Jun 19, 2026
@kwsantiago
kwsantiago merged commit ba3bfd8 into main Jun 19, 2026
3 checks passed
@kwsantiago
kwsantiago deleted the feat/integration-tests branch June 19, 2026 16:50
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.

Integration tests

1 participant