Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] [full-ci] Cleanup spaces in all local API test suites #4456

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Aug 25, 2022

Description

There is AfterScenario in SpacesContext that calls deleteAllProjectSpaces and deleteAllPersonalSpaces to cleanup properly at the end of each scenario. See PR #4441 for the latest version of that code.

But SpacesContext is not currently used in the other local API test suites. But those test suites do create users, and those users have a personal space. Those suites do not create project spaces - so deleteAllProjectSpaces will have nothing to do, that is OK. But it will be good for deleteAllPersonalSpaces to run in those test suites.

This PR adds SpacesContext to those test suites. That will cause the AfterScenario to be found and to be run.

This is a follow-on related to issue #4390

How Has This Been Tested?

CI

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:

Copy link
Contributor

@kiranparajuli589 kiranparajuli589 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange, CI is failing, maybe you've to add OCS context too

┌─ @BeforeScenario # SpacesContext::setUpScenario()
  │
  ╳  `OCSContext` context is not found in the suite environment. Have you registered it?
  │
  Scenario: send PUT requests to webDav endpoints as normal user with no password             

build: https://drone.owncloud.com/owncloud/ocis/14932/40/7

@phil-davis phil-davis force-pushed the cleanup-spaces-in-all-local-API-test-suites branch from e4d1a63 to e57fa20 Compare August 25, 2022 08:29
@phil-davis
Copy link
Contributor Author

strange, CI is failing, maybe you've to add OCS context too

yes, the setupScenario stuff gets called now. I added OCSContext

@phil-davis phil-davis force-pushed the cleanup-spaces-in-all-local-API-test-suites branch from e57fa20 to eabb641 Compare August 25, 2022 10:38
@phil-davis phil-davis force-pushed the cleanup-spaces-in-all-local-API-test-suites branch from eabb641 to 4c58ce3 Compare August 25, 2022 11:55
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis phil-davis merged commit c64c64b into master Aug 25, 2022
@delete-merged-branch delete-merged-branch bot deleted the cleanup-spaces-in-all-local-API-test-suites branch August 25, 2022 16:39
ownclouders pushed a commit that referenced this pull request Aug 25, 2022
Merge: f57fe29 4c58ce3
Author: Phil Davis <[email protected]>
Date:   Thu Aug 25 22:24:48 2022 +0545

    Merge pull request #4456 from owncloud/cleanup-spaces-in-all-local-API-test-suites

    [tests-only] [full-ci] Cleanup spaces in all local API test suites
ownclouders pushed a commit that referenced this pull request Aug 26, 2022
Merge: f57fe29 4c58ce3
Author: Phil Davis <[email protected]>
Date:   Thu Aug 25 22:24:48 2022 +0545

    Merge pull request #4456 from owncloud/cleanup-spaces-in-all-local-API-test-suites

    [tests-only] [full-ci] Cleanup spaces in all local API test suites
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants