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] tests: add api tests for deleting public link password #7828

Merged
merged 5 commits into from
Dec 2, 2023

Conversation

SwikritiT
Copy link
Contributor

part of: #7823

@SwikritiT SwikritiT self-assigned this Nov 28, 2023
@SwikritiT SwikritiT force-pushed the tests/delete-link-password branch 2 times, most recently from f652340 to 29c5762 Compare November 29, 2023 03:46
@SwikritiT SwikritiT marked this pull request as ready for review November 29, 2023 05:06
Comment on lines +171 to +173
Then the HTTP status code should be "200"
And the OCS status code should be "104"
And the OCS status message should be "user is not allowed to delete the password from the public link"
Copy link
Contributor Author

@SwikritiT SwikritiT Dec 1, 2023

Choose a reason for hiding this comment

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

This is a peculiar case where the error message and OCS status code is different. If I'm not wrong 1xx is the success for ocs endpoints? The error message on this one is however very nice. I have written this scenario as the server behaves right now as I don't know if this is an expected response or not.
Should the error code be 400 like in other similar cases what about the error message?
cc @ScharfViktor @saw-jan

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's leave it at that. The main thing is that Brian can't delete the password. The web hides the password delete button for Brian, so the user can only try to delete the password using the api (he can see the message there).

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.

Generally looks good.

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.

LGTM

Copy link

sonarcloud bot commented Dec 1, 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

@saw-jan saw-jan merged commit d37cea3 into master Dec 2, 2023
4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the tests/delete-link-password branch December 2, 2023 02:40
@SwikritiT SwikritiT mentioned this pull request Dec 4, 2023
9 tasks
2403905 pushed a commit to 2403905/ocis that referenced this pull request Dec 8, 2023
2403905 pushed a commit to 2403905/ocis that referenced this pull request Jan 24, 2024
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.

None yet

4 participants