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

fixed the response code when copying the file from shares to personal space #4775

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

2403905
Copy link

@2403905 2403905 commented Jul 23, 2024

Related Issue #9482

@2403905 2403905 requested review from labkode, a team and glpatcern as code owners July 23, 2024 16:19
Copy link
Contributor

@fschade fschade left a comment

Choose a reason for hiding this comment

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

LGTM, one thing, since there was no red ci, i expect we have not tested this code path in the past... could you add some tests for httpDownloadRes.StatusCode == http.StatusForbidden.

just in case, why do you return nil instead of the err?

THANKS 🤗

@phil-davis
Copy link
Contributor

From an API test point-of-view, I think test coverage is related to issue owncloud/ocis#8428
API tests have not been added yet for this case. And I think that we have been asked not to add test scenarios that fail (for example, due to a known reported bug like this). So there won't be an API test scenario that starts passing.

To verify the fix at the API level, someone would need to add a test scenario to the ocis API tests, then make that test run here (an extra PR from here that uses the new branch in ocis as the source for the tests).

But maybe you are just referring to unit tests? @fschade I am not sure what level of test you mean.

@fschade
Copy link
Contributor

fschade commented Jul 23, 2024

From an API test point-of-view, I think test coverage is related to issue owncloud/ocis#8428 API tests have not been added yet for this case. And I think that we have been asked not to add test scenarios that fail (for example, due to a known reported bug like this). So there won't be an API test scenario that starts passing.

To verify the fix at the API level, someone would need to add a test scenario to the ocis API tests, then make that test run here (an extra PR from here that uses the new branch in ocis as the source for the tests).

But maybe you are just referring to unit tests? @fschade I am not sure what level of test you mean.

Yes exactly, not a logic test, more like a behavior test :)
thanks for the detailed explanation

@saw-jan
Copy link
Contributor

saw-jan commented Jul 24, 2024

We have a PR owncloud/ocis#9437 to cover the behavior but not merged because it was not fixed yet. We will test and report if the fixes worked with the new test scenarios.

@saw-jan
Copy link
Contributor

saw-jan commented Jul 24, 2024

Also, we do not have secure-view role test scenarios in coreApi tests (test suites running for reva). Secure view tests only runs in ocis ci because we do not run ocis api test suites (tests suites starting with api<Suitename>) in reva.

@2403905
Copy link
Author

2403905 commented Jul 24, 2024

LGTM, one thing, since there was no red ci, i expect we have not tested this code path in the past... could you add some tests for httpDownloadRes.StatusCode == http.StatusForbidden.

just in case, why do you return nil instead of the err?

THANKS 🤗

We return the nil because the error will be handled as a 500

@2403905 2403905 merged commit 53e5aaf into cs3org:edge Jul 24, 2024
9 of 10 checks passed
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.

4 participants