Skip to content

Conversation

@individual-it
Copy link
Contributor

@individual-it individual-it commented Aug 29, 2025

Description

Run acceptance tests with VIPS by default

Related Issue

opencloud-eu/qa#43
opencloud-eu/qa#66

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 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 added

@ScharfViktor ScharfViktor force-pushed the runTestsWithVIPS branch 2 times, most recently from e2294ea to 98d10b0 Compare September 2, 2025 13:06
@ScharfViktor ScharfViktor marked this pull request as ready for review September 2, 2025 13:06
@ScharfViktor
Copy link
Contributor

ScharfViktor commented Sep 2, 2025

strict comparing for image files works fine but for .txt file fails in CI (but works fine localy)

@need-build-with-VIPS
  Scenario Outline: it should update the preview content if the file content is updated (content with UTF chars)
    Given using <dav-path-version> DAV path
    And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/lorem.txt"
    And user "Alice" has uploaded file with content "ओनक्लाउड फाएल शेरिङ्ग एन्ड सिन्किङ" to "/lorem.txt"
    When user "Alice" downloads the preview of "/lorem.txt" with width "32" and height "32" using the WebDAV API
    Then the HTTP status code should be "200"
    And the downloaded image should be "32" pixels wide and "32" pixels high
    And the downloaded preview content should match with "unicode-fixture.png" fixtures preview content
    Examples:
      | dav-path-version |
      | old              |
      | new              |
      | spaces           |

Perhaps my libvips library on Mac works a little differently than in CI. @individual-it, could you generate the unicode-fixture.png file on your laptop using a similar version of apt-get install libvips42? Or I can change this check using a tolerance.

how to do it:

  • upload file like here: And user "Alice" has uploaded file with content "ओनक्लाउड फाएल शेरिङ्ग एन्ड सिन्किङ" to "/lorem.txt"
  • curl -vk -u alice:123456 -o unicode-fixture.png 'https://cloud.opencloud.test/remote.php/webdav/lorem.txt?x=32&y=32&preview=1'
  • replace file to tests/acceptance/fixtures/unicode-fixture.png

@individual-it
Copy link
Contributor Author

@ScharfViktor can you try with a bigger size preview? because for me (using the docker container) it does not work. It only returns squares:
unicode-fixture-big

@ScharfViktor
Copy link
Contributor

I got the fixure image on a remote Linux computer with libvips42 installed. The test passed locally, let's see what CI says.

@individual-it
Copy link
Contributor Author

yes, but now there are no special non-latin UTF characters.
grafik
I think this is a bug, the preview should also work with nepali and other characters

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Sep 3, 2025

think this is a bug, the preview should also work with nepali and other characters

true, preview works only with latin and cyrillic

image

@ScharfViktor
Copy link
Contributor

but the test doesn't work. even when we use Latin

When user "Alice" downloads the preview of "/lorem.txt" with width "32" and height "32" using the WebDAV API
When user "Alice" downloads the preview of "/lorem.txt" with width "1200" and height "1200" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded image should be "32" pixels wide and "32" pixels high
Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are checking the size in every other test except of here, any special reason for that?
theoretically we don't need to check the size, because we are trying to match the file anyway. so if the size would be wrong the test would also fail

@ScharfViktor ScharfViktor force-pushed the runTestsWithVIPS branch 2 times, most recently from 1dabf0b to 3699192 Compare September 3, 2025 14:00
@ScharfViktor ScharfViktor merged commit 81bbb5c into main Sep 5, 2025
95 checks passed
@ScharfViktor ScharfViktor deleted the runTestsWithVIPS branch September 5, 2025 08:55
@openclouders openclouders mentioned this pull request Sep 4, 2025
1 task
micbar pushed a commit that referenced this pull request Oct 15, 2025
* [full-ci] run tests with VIPS enabled

* fix

* fix

---------

Co-authored-by: Viktor Scharf <v.scharf@opencloud.eu>
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.

3 participants