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] preview tests modified for ocis server #38744

Merged
merged 1 commit into from
May 26, 2021

Conversation

kiranparajuli589
Copy link
Contributor

@kiranparajuli589 kiranparajuli589 commented May 18, 2021

Description

  • In oC10 when a request for a thumbnail is made with the dimensions x=1,y=32 then server responds with an image 1px wide and 32px high. In ocis, the larger value from the two dimensions is taken to recalculate the smaller dimension to match the original aspect ratio. For that reason requesting x=0 is a valid option in the oCIS service. Requesting a file preview with an invalid size results in HTTP code 200 ocis#188 (comment)
  • different resolution for thumbnails is set using the following query parameters in the endpoint {{base-url}}/remote.php/dav/files/{{username}}/{{file_path}}
    • oc10 query params
    {
        c: e00d1bc836c635bb6d741c343c0b71e1,
        x: 32,
        y: 32,
        forceIcon: 0,
        preview: 1
    }
    • ocis query params
    {
       a: 1,
       c: 39029fa1ad3b0ab20194b45f130fab2a,
       preview: 1,
       scalingup: 0,
       x: 1280,
       y: 1280
    }

    PROXY_ENABLE_BASIC_AUTH=true

  • different test scenarios added for the different behavior of the different backend

Related Issue

Motivation and Context

How Has This Been Tested?

  • 🤖
  • ci

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • 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:
  • Changelog item, see TEMPLATE

@kiranparajuli589 kiranparajuli589 changed the title [Tests-Only] tests modified according to ocis responses [Tests-Only] preview tests modified according to ocis responses May 18, 2021
@kiranparajuli589 kiranparajuli589 force-pushed the previews-api-tests branch 3 times, most recently from 5ffc6fe to 0f11474 Compare May 24, 2021 04:54
@kiranparajuli589 kiranparajuli589 force-pushed the previews-api-tests branch 3 times, most recently from b619232 to 25393cb Compare May 24, 2021 08:23
@kiranparajuli589 kiranparajuli589 changed the title [Tests-Only] preview tests modified according to ocis responses [Tests-Only] preview tests modified for ocis server May 24, 2021
@kiranparajuli589 kiranparajuli589 marked this pull request as ready for review May 24, 2021 14:00
@kiranparajuli589 kiranparajuli589 self-assigned this May 25, 2021
Copy link
Contributor

@Talank Talank left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Contributor

@dpakach dpakach left a comment

Choose a reason for hiding this comment

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

looks good. If you add new tests at the bottom of the file, you wont have to change as many lines in the expected failures file.

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

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

please use general skipOnOcis tag for tests that should not run on ocis, no need to mention every storage separately
And tests that are specific for ocis, should be placed in the ocis repo

@kiranparajuli589
Copy link
Contributor Author

kiranparajuli589 commented May 25, 2021

Specific ocis related tests moved using owncloud/ocis#2075

@sonarcloud
Copy link

sonarcloud bot commented May 26, 2021

Kudos, SonarCloud 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

@kiranparajuli589 kiranparajuli589 merged commit caee294 into master May 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the previews-api-tests branch May 26, 2021 09:38
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