Skip to content

test(apiSpaces): a space admin can delete a space with no manager#3040

Merged
ScharfViktor merged 1 commit into
opencloud-eu:mainfrom
michaelstingl:issue-1878-orphan-space-lockin
Jun 29, 2026
Merged

test(apiSpaces): a space admin can delete a space with no manager#3040
ScharfViktor merged 1 commit into
opencloud-eu:mainfrom
michaelstingl:issue-1878-orphan-space-lockin

Conversation

@michaelstingl

@michaelstingl michaelstingl commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

Adds one acceptance scenario to apiSpaces/disableEnableDeleteSpaces.feature. After the only manager of a project space is deleted, a space admin must still be able to list the space and delete it (disable, then purge).

All steps reuse existing step definitions. The change adds no step code.

Related Issue

Motivation and Context

#1877 reordered the api-test teardown to delete spaces before users. As a result, the suite no longer exercises the state where a project space's manager has been deleted, even incidentally, and no explicit scenario covers it.

Deleting a user who manages a project space is a normal operation. It happens on every user removal, including out-of-band removal via an external IdP. The space must stay manageable by a space admin afterwards. This scenario pins that behavior so a later change cannot regress it.

Note

The scenario exercises the read path for a space whose manager is gone. On a server without the reva read-path fixes, that path logs could not read node and error while indexing a space (the subject of #1878, addressed by opencloud-eu/reva#710 and opencloud-eu/reva#713). The scenario is green regardless: the space stays listable and deletable. The log noise is a server-side concern, not an API status.

How Has This Been Tested?

behat acceptance, run against a stock opencloud-rolling:7.2.0 container on both storage drivers:

  • posix: 14/14 steps pass
  • decomposed: 14/14 steps pass

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

πŸ€– drafted with Claude Code, reviewed before submitting.

opencloud-eu#1877 reordered the api-test teardown to delete spaces before users, so the
state where a project space's manager has been deleted is no longer exercised.
This adds explicit coverage for it: the only manager of a project space is
deleted, and a space admin can still list and delete (disable + purge) the space.

Related: opencloud-eu#1878
@codacy-production

codacy-production Bot commented Jun 29, 2026

Copy link
Copy Markdown

Up to standards βœ…

🟒 Issues 0 issues

Results:
0 new issues

View in Codacy

🟒 Coverage βˆ… diff coverage Β· -0.02% coverage variation

Metric Results
Coverage variation βœ… -0.02% coverage variation (-1.00%)
Diff coverage βœ… βˆ… diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ab7cf46) 82289 18957 23.04%
Head commit (893aa05) 82289 (+0) 18940 (-17) 23.02% (-0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3040) 0 0 βˆ… (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@ScharfViktor ScharfViktor merged commit ea29a5d into opencloud-eu:main Jun 29, 2026
61 checks passed
@openclouders openclouders mentioned this pull request Jun 29, 2026
1 task
@michaelstingl michaelstingl deleted the issue-1878-orphan-space-lockin branch June 29, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants