test: system_test coverage for encrypted folder share lifecycle and boundaries#1170
Open
nahom4 wants to merge 2 commits into
Open
test: system_test coverage for encrypted folder share lifecycle and boundaries#1170nahom4 wants to merge 2 commits into
nahom4 wants to merge 2 commits into
Conversation
Adds 20 subtests to TestShareFile covering the scenarios from Saswata's review of fix/pre-reuse-folder-entropy: empty-folder share, pre-existing files (top-level and nested), add file / nested folder / deep nesting after share, update file (top-level and nested), rename file (top-level, nested) and nested folder, move into and within shared folder, delete file and nested folder, cross-wallet rejection, remotepath escape, lookuphash escape, and sibling-folder list rejection. Every test materialises shared directory refs via `zbox createdir` to exercise NewDirectoryRef() - the code path the gosdk fix targets. Existing "Share folder with encrypted file" test (uploads unencrypted content despite its name) is left untouched; out of scope for this PR.
Blobbers return "Error while getting file ref: ref not found" for denied or out-of-scope access, not "consensus_not_met" (which is a blockchain tx failure). Updated 5 negative-case assertions and removed the overly-specific lookuphash escape assertion (require.NotNil on err is sufficient). Also added "allocation flag is missing" to the sibling-list rejection check. All 20 subtests now pass against test.zus.network.
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
TestShareFilecovering the full lifecycle and security boundaries of encrypted folder sharing, validating the gosdk fix infix/pre-reuse-folder-entropy(commit9dfc92c4)zbox createdirto exercise the exactNewDirectoryRef()code path the fix targetstest.zus.networkWhat the tests cover
Baseline + add (Block A): empty-folder share then add file, pre-existing top-level file, pre-existing nested file, add top-level file after share, add nested folder after share, add deeply nested folders (3 levels) after share
Update (Block B): update top-level file content after share, update nested file content after share
Rename (Block C): rename top-level file, rename nested file, rename nested folder (proxy key survives path change)
Move (Block D): move file from outside share into shared folder, move file within shared folder
Delete (Block E): delete top-level file (sibling still works), delete nested file (parent and siblings still work), delete nested folder contents (top-level still works)
Security / negative (Block F+G): unrelated wallet cannot use recipient ticket, recipient cannot escape via
--remotepath, recipient cannot escape via crafted--lookuphash(sha3-256 path-hash manipulation), recipient cannot list sibling folder via authticketTest plan
test.zus.networkwith-parallel=1 -timeout 120mref not found(notconsensus_not_met) for denied accessRelated
gosdk fix PR:
fix/pre-reuse-folder-entropy