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

[stable9.0] Proper separation of quota values in APIs #27957

Closed
wants to merge 1 commit into from

Conversation

Gomez
Copy link
Member

@Gomez Gomez commented May 19, 2017

Backport of #27896

Fixes: #27608

@Gomez Gomez changed the title Proper separation of quota values in APIs [stable9.0] Proper separation of quota values in APIs May 19, 2017
@PVince81
Copy link
Contributor

Thanks. If you tested all scenarios I listed in the original ticket, please post them here

@PVince81 PVince81 added this to the 9.0.10 milestone May 19, 2017
@DeepDiver1975
Copy link
Member

bildschirmfoto von 2017-05-19 13-54-25

@Gomez Gomez force-pushed the stable9.0-fixdefaultquota branch from 246414f to d7a858a Compare May 29, 2017 10:23
@Gomez
Copy link
Member Author

Gomez commented May 29, 2017

Same unit errors as here #27895 (comment) cant spot the difference. Any help appreciated.

Tests done:

Set default quota to 5 GB

  • TEST: newly created user gets "default" quota, properly applies in personal page, 5 GB
  • TEST: set existing user quota to "default", properly applies in personal page, 5 GB
  • TEST: set existing user quota to "unlimited", properly applies in personal page (unlimited)
  • TEST: set existing user quota to "1 GB", properly applies in personal page, 1 GB

@PVince81
Copy link
Contributor

Indeed, the patch is the same like stable9.1...

@PVince81 PVince81 modified the milestones: 9.0.11, 9.0.10 May 29, 2017
@PVince81 PVince81 modified the milestones: triage, 9.0.11 Jun 29, 2017
@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2017

running all the tests locally do not reproduce this issue... classic.

And running the versions suite alone gives me weird errors:

...FF....F......E...                                              20 / 20 (100%)

Time: 1.23 seconds, Memory: 33.50MB

There was 1 error:

1) Test_Files_Versioning::testRestoreNoPermission
Exception: The share API is disabled

/srv/www/htdocs/owncloud/lib/private/share20/manager.php:486
/srv/www/htdocs/owncloud/lib/private/share20/manager.php:504
/srv/www/htdocs/owncloud/apps/files_versions/tests/versions.php:631

welcome to weirdland

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2017

okay, seems I got it with phpunit 4.4.5:


11) Test_Files_Versioning::testRename
Failed asserting that false is true.

/srv/www/htdocs/owncloud/apps/files_versions/tests/versions.php:290

12) Test_Files_Versioning::testRenameInSharedFolder
Failed asserting that false is true.

/srv/www/htdocs/owncloud/apps/files_versions/tests/versions.php:333

13) Test_Files_Versioning::testCopy
Failed asserting that false is true.

/srv/www/htdocs/owncloud/apps/files_versions/tests/versions.php:532

why 11) ? well, locally there are some tests that always failed for me (testGetThumbnail: your test is not allowed to access the database), never had time to look into these...

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2017

Apparently the quota returned in OCA\Files_Versions\Storage is "default" but the code passes this to computerFileSize which converts it to 0. I'll try and fix this, seems something is missing here.

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2017

ah yes of course, you're missing a lot of the code from the original stable9.1 PR, like f5734c0#diff-efc44835a2c59b3707c965b80a3d669e

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2017

I'm going to redo the backport from scratch, just in case

@PVince81 PVince81 closed this Jul 5, 2017
@PVince81 PVince81 deleted the stable9.0-fixdefaultquota branch July 5, 2017 08:49
@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2017

protip: to backport to stable9, create patches with git format-patch, then edit the patches, lower case the file names, remove "test" suffixes. Then use git am -3 patch.patch to apply.

@PVince81 PVince81 mentioned this pull request Jul 5, 2017
4 tasks
@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2017

new PR: #28302

@Gomez
Copy link
Member Author

Gomez commented Jul 6, 2017

Thanks @PVince81 for redo and the protip !

@felixboehm felixboehm removed this from the triage milestone Apr 10, 2018
@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants