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] adding user quota using graph api instead of Provisioning api #7000

Merged
merged 6 commits into from
Jan 24, 2024

Conversation

S-Panta
Copy link
Contributor

@S-Panta S-Panta commented Aug 9, 2023

Description

This PR changes the test code and feature lines where the setting of user quota uses graph API. Previously, the test wasn't passing as it used provisioning API but at the moment oCIS uses graph for that task.

Related Issue

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:

@S-Panta S-Panta self-assigned this Aug 9, 2023
@S-Panta S-Panta added the QA:team label Aug 9, 2023
@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch from 53fe2b7 to 2340bc3 Compare August 9, 2023 11:27
@sonarcloud
Copy link

sonarcloud bot commented Aug 9, 2023

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

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch from 2340bc3 to cfe9f76 Compare August 10, 2023 03:49
@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch 2 times, most recently from 2702e51 to 9ba3623 Compare November 27, 2023 11:32
Copy link

sonarcloud bot commented Nov 27, 2023

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

@SwikritiT
Copy link
Contributor

SwikritiT commented Dec 15, 2023

@S-Panta what is the status of this PR it's been a long time can we get this merged? or closed if it is not relevant anymore?

@S-Panta
Copy link
Contributor Author

S-Panta commented Dec 15, 2023

I will continue on this PR next week.

@S-Panta S-Panta self-assigned this Jan 1, 2024
@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch 4 times, most recently from da17489 to d61befa Compare January 2, 2024 11:18
@S-Panta
Copy link
Contributor Author

S-Panta commented Jan 3, 2024

I feel that the scenario of the feature file getQuota inside the coreWebDavProperties1 should only be limited to Reva. Setting and Getting the quota using graphs and ocs ( in Reva) have different sets of request and response bodies. For example, for a graph API, the quota should be given as an integer while the ocs API uses 10 MB as the body to set any quota. The response seems different too.
Should this PR be closed but separate issues be opened so that tests could be added regarding getting quota as I find no such test in other files inside apiGraph? @saw-jan @SwikritiT

@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch 4 times, most recently from f846b78 to a7c8ccd Compare January 3, 2024 09:38
@S-Panta
Copy link
Contributor Author

S-Panta commented Jan 3, 2024

I have refactored this file so that the test coverage for the graph related to user quota is covered.

@S-Panta S-Panta marked this pull request as ready for review January 4, 2024 03:42
@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch 2 times, most recently from 5da816e to ecf69b9 Compare January 4, 2024 04:51
@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch from e4f6104 to 4e6cd27 Compare January 11, 2024 11:44
@S-Panta
Copy link
Contributor Author

S-Panta commented Jan 15, 2024

Blocked until this bug is fixed.
#8197

Copy link
Contributor

@ScharfViktor ScharfViktor left a comment

Choose a reason for hiding this comment

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

I suggest you don't block this PR. I'm not sure if #8197 will be fixed anytime soon.

Then the HTTP status code should be "200"
And the single response should contain a property "d:quota-available-bytes" with value "10485406"
Then the HTTP status code should be "207"
And the single response should contain a property "d:quota-available-bytes" with value "10000"
Copy link
Contributor

Choose a reason for hiding this comment

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

wow, we suppose here that Alice can see Brian's quota.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

d:quota-available-bytes is responding wrong value. In practice, it should show the quota of Brian that is available for that folder not the full quota. Even when other files are inside Brian , the propfind would show all the remaining spaces of Brian. So maybe this is related to the issue too.

@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch from b0f4ab1 to 637c249 Compare January 19, 2024 06:15
@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch 2 times, most recently from 964844b to 0d7f42a Compare January 22, 2024 04:06
@S-Panta S-Panta force-pushed the refactoring-tests-relating-to-userquota-to-graphAPI branch from 0d7f42a to 00105f4 Compare January 23, 2024 05:59
Copy link

sonarcloud bot commented Jan 23, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

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

LGTM

@saw-jan saw-jan merged commit be8973d into master Jan 24, 2024
4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the refactoring-tests-relating-to-userquota-to-graphAPI branch January 24, 2024 04:27
ownclouders pushed a commit that referenced this pull request Jan 24, 2024
…ovisioning api (#7000)

* refactored getQuota scenario

* deleted quota step inside provisioning file

* updating feature file of quota as per graphapi

* updated expected failures file

* updated expected failures file

* removed issue tag
PrajwolAmatya pushed a commit that referenced this pull request Jan 24, 2024
…ovisioning api (#7000)

* refactored getQuota scenario

* deleted quota step inside provisioning file

* updating feature file of quota as per graphapi

* updated expected failures file

* updated expected failures file

* removed issue tag
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