Repository navigation
test(decomposedfs): assert a space manager may disable a project space - #730
Merged
rhafer merged 1 commit intoJul 7, 2026
Merged
Conversation
Since opencloud-eu#672 a space manager may disable but not purge a project space. The "can delete (purge) project spaces" context asserts only the denial side ("fails as a space manager" purge); the positive counterpart, that a manager may still disable, was untested. A regression breaking manager disable would pass the suite unnoticed. Add the counterpart It: create a fresh project space and disable it as the space manager, expecting success (the shared space in BeforeEach is already disabled, so the test uses its own). Test-only, no production change.
3 of 9 tasks
rhafer
approved these changes
Jul 7, 2026
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.
Description
Adds one test to the
can delete (purge) project spacescontext inpkg/storage/pkg/decomposedfs/spaces_test.go:succeeds at disabling as a space manager. It creates a fresh project space and disables it asenv.SpaceManager, expecting success. This exercises the!purge && IsManager(rp)branch ofcanDeleteSpace. A fresh space is used becauseBeforeEachpre-disables the shared one.Related Issue
None. Covers the disable-allowed half of the manager permission split from #672.
Motivation and Context
Since #672 a space manager may disable but not purge a project space. The context asserts only the denial side (
fails as a space manager); the disable case was untested, so a regression breaking manager disable would pass unnoticed. #716 realigned the purge tests here but did not add this assertion. Supersedes the disable half of #709 (now closed).How Has This Been Tested?
golang:1.25container, source on an ext4 volume foruser.*xattr support (native macOS is unreliable for these tests)go test ./pkg/storage/pkg/decomposedfs/: both space-manager specs pass (fails as a space managerand the new one)gofmt,go vet,golangci-lint v2.10.1: clean on the packageTypes of changes
Checklist:
Type:*label via ready-release-go, so no fragment is needed)🤖 drafted with Claude Code, reviewed before submitting.