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

Request preview with the same size as in the file listing #744

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

CarlSchwan
Copy link
Member

Potentially will allow bigger caching potential with a few other changes
in the server repo

Signed-off-by: Carl Schwan carl@carlschwan.eu

@CarlSchwan
Copy link
Member Author

Failing tests are caused by unrelated change in the server repo with CachedMountFileInfo

@nickvergessen
Copy link
Member

Failures are new in this branch:

There were 4 failures:

1) OCA\Activity\Tests\Controller\APIv2ControllerTest::testGetPreview with data set #0 ('author', 42, '/path', '/currentPath', true, true, false, '/preview/dir', true, 'dir')
Failed asserting that false is identical to Array &0 (
    'link' => '/preview/currentPath'
    'source' => '/preview/dir'
    'mimeType' => 'dir'
    'isMimeTypeIcon' => true
    'fileId' => 42
    'view' => 'files'
    'filename' => 'path'
).

/home/nickv/Nextcloud/24/server/appspackaged/activity/tests/Controller/APIv2ControllerTest.php:772

2) OCA\Activity\Tests\Controller\APIv2ControllerTest::testGetPreview with data set #1 ('author', 42, '/file.txt', '/currentFile.txt', false, true, false, '/preview/mpeg', true, 'audio/mp3')
Failed asserting that false is identical to Array &0 (
    'link' => '/preview/currentFile.txt'
    'source' => '/preview/mpeg'
    'mimeType' => 'audio/mp3'
    'isMimeTypeIcon' => true
    'fileId' => 42
    'view' => 'files'
    'filename' => 'file.txt'
).

/home/nickv/Nextcloud/24/server/appspackaged/activity/tests/Controller/APIv2ControllerTest.php:772

3) OCA\Activity\Tests\Controller\APIv2ControllerTest::testGetPreview with data set #2 ('author', 42, '/file.txt', '/currentFile.txt', false, true, true, '/preview/currentFile.txt', false, 'text/plain')
Failed asserting that false is identical to Array &0 (
    'link' => '/preview/currentFile.txt'
    'source' => '/preview/currentFile.txt'
    'mimeType' => 'text/plain'
    'isMimeTypeIcon' => false
    'fileId' => 42
    'view' => 'files'
    'filename' => 'file.txt'
).

/home/nickv/Nextcloud/24/server/appspackaged/activity/tests/Controller/APIv2ControllerTest.php:772

4) OCA\Activity\Tests\Controller\APIv2ControllerTest::testGetPreview with data set #3 ('author', 42, '/file.txt', '/currentFile.txt', false, false, true, 'source::getPreviewFromPath', true, 'text/plain')
Failed asserting that false is identical to Array &0 (
    'link' => '/preview/currentFile.txt'
    'source' => 'source::getPreviewFromPath'
    'mimeType' => 'text/plain'
    'isMimeTypeIcon' => true
    'fileId' => 42
    'view' => 'files'
    'filename' => 'file.txt'
).

/home/nickv/Nextcloud/24/server/appspackaged/activity/tests/Controller/APIv2ControllerTest.php:772

ERRORS!

The errors also happen in master: #745

There were 2 errors:

1) OCA\Activity\FilesHooksTest::testAddNotificationsForFileAction with data set #2 (array(array(42), array(false)), true, true, array(array('restored_self', array(array('/path')), '/path', false, 42), array('restored_by', array(array('/path'), 'user'), '/path', false, 0)))
ArgumentCountError: Too few arguments to function OC\Files\Config\CachedMountFileInfo::__construct(), 7 passed in /home/nickv/Nextcloud/24/server/appspackaged/activity/tests/FilesHooksTest.php on line 421 and exactly 8 expected

/home/nickv/Nextcloud/24/server/lib/private/Files/Config/CachedMountFileInfo.php:33
/home/nickv/Nextcloud/24/server/appspackaged/activity/tests/FilesHooksTest.php:421

2) OCA\Activity\FilesHooksTest::testAddNotificationsForFileAction with data set #3 (array(array(), array(true)), true, true, array(array('restored_self', array(array('/path')), '/path', false, 0), array('restored_by', array(array('/path'), 'user'), '/path', true, 0)))
ArgumentCountError: Too few arguments to function OC\Files\Config\CachedMountFileInfo::__construct(), 7 passed in /home/nickv/Nextcloud/24/server/appspackaged/activity/tests/FilesHooksTest.php on line 421 and exactly 8 expected

/home/nickv/Nextcloud/24/server/lib/private/Files/Config/CachedMountFileInfo.php:33
/home/nickv/Nextcloud/24/server/appspackaged/activity/tests/FilesHooksTest.php:421

@CarlSchwan CarlSchwan force-pushed the fix/request-same-file-list branch 2 times, most recently from 50fccd6 to 2d010ab Compare April 19, 2022 12:02
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan CarlSchwan force-pushed the fix/request-same-file-list branch from 2d010ab to 771ade5 Compare April 19, 2022 13:10
@nickvergessen nickvergessen merged commit f19b357 into master Apr 20, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix/request-same-file-list branch April 20, 2022 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants