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] ApiTest. after each test users-manager delete their project space #4441

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

ScharfViktor
Copy link
Contributor

@ScharfViktor ScharfViktor commented Aug 23, 2022

Part2 of issue #4390

  • method works well and clears project spaces

But there is one little problem when we run tests without creating project space and method https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/bootstrap/SpacesContext.php#L897-L904 tries to remember no spaces:

Screenshot 2022-08-23 at 13 55 29

@ScharfViktor
Copy link
Contributor Author

CI is green but stucks due docker arm https://drone.owncloud.com/owncloud/ocis/14823

@phil-davis
Copy link
Contributor

I'm not sure why we need the assertArrayHasKey check in rememberTheAvailableSpaces() - if $drives is empty, then that means there are none that matched whatever was the last query/filter. The same with Assert::assertNotEmpty($spaces, "No spaces have been found"); - it might be normal that there are no spaces found. It needs some refactoring to maybe know when it should expect to find something, and when it is being called in a situation where there might be nothing.

@sonarcloud
Copy link

sonarcloud bot commented Aug 24, 2022

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

@ScharfViktor
Copy link
Contributor Author

I'm not sure why we need the assertArrayHasKey check in rememberTheAvailableSpaces() - if $drives is empty, then that means there are none that matched whatever was the last query/filter. The same with Assert::assertNotEmpty($spaces, "No spaces have been found"); - it might be normal that there are no spaces found. It needs some refactoring to maybe know when it should expect to find something, and when it is being called in a situation where there might be nothing.

I deleted asserts in rememberSpaces method. now pr's ready for review.

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

LGTM

@phil-davis phil-davis merged commit bbca91b into master Aug 25, 2022
@delete-merged-branch delete-merged-branch bot deleted the deleteAllProjectSpaceAfterTest branch August 25, 2022 06:44
ownclouders pushed a commit that referenced this pull request Aug 25, 2022
Merge: 9ceaf14 c7a6d5a
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Aug 25 12:29:07 2022 +0545

    Merge pull request #4441 from owncloud/deleteAllProjectSpaceAfterTest

    [tests-only] [full-ci] ApiTest. after each test users-manager delete their project space
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants