test: end-to-end integration tests for full mesh lifecycle (#66)#85
Merged
Conversation
Add comprehensive E2E integration tests that validate the protocol redesign from PR #84 against a real DWN server: - TestE2EFullMeshLifecycle: exercises the complete mesh lifecycle with both owner-provisioned (network/node) and member-associated (network/member/node) paths, including CreateMember, WriteNodeInfo, WriteEndpoint, and LoadState dual-path merging. - TestE2ERecipientBasedOwnerNodeWrite: regression test for the exact scenario that was broken before PR #84 — a non-anchor node writing its own nodeInfo and endpoint using recipient-based authorization. - TestE2EACLPolicyRoundTrip: writes an ACL policy to the anchor DWN and verifies LoadState produces correct, non-wildcard filter rules with DID-to-IP resolution and port ranges. - TestE2ELoadStateNonAnchor: verifies a non-anchor node can run LoadState using the network/node role for read authorization. These tests require DWN_ENDPOINT to be set and are skipped otherwise. They cover gaps not exercised by existing tests: member layer, nodeInfo writes, dual-path LoadState, ACL round-trip, and non-anchor reads.
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
Adds comprehensive E2E integration tests that validate the protocol redesign from PR #84 against a real DWN server. These tests cover the critical gaps identified in issue #66.
New Tests
TestE2EFullMeshLifecycleTestE2ERecipientBasedOwnerNodeWriteTestE2EACLPolicyRoundTripTestE2ELoadStateNonAnchornetwork/noderole for read authorization, verifying role-based reads work from the joiner perspectiveCoverage Gaps Filled
CreateMember→network/member/node→ nodeInfo → endpoint) — never exercised beforeWriteNodeInfo— never called in any integration test beforeLoadStatedual-path merge — queries 10 record types across both paths, verified end-to-endWriteACLPolicy→LoadState→ filter rules verifiedLoadState— role-based reads from joiner perspectiveVerification
go build ./...— zero errorsgo vet ./...— zero warningsgo test ./... -count=1 -race— all tests pass (integration tests skip withoutDWN_ENDPOINT)Closes #66