Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .woodpecker.star
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ DEFAULT_PHP_VERSION = "8.2"
DEFAULT_NODEJS_VERSION = "20"

CACHE_S3_SERVER = "https://s3.ci.opencloud.eu"
INSTALL_LIBVIPS_COMMAND = "apt-get update; apt-get install libvips42 -y"

dirs = {
"base": "/woodpecker/src/github.com/opencloud-eu/opencloud",
Expand Down Expand Up @@ -2137,6 +2138,7 @@ def opencloudServer(storage = "decomposed", accounts_hash_difficulty = 4, depend
"commands": [
"apt-get update",
"apt-get install -y inotify-tools xattr",
INSTALL_LIBVIPS_COMMAND,
"%s init --insecure true" % dirs["opencloudBin"],
"cat $OC_CONFIG_DIR/opencloud.yaml",
"cp tests/config/woodpecker/app-registry.yaml $OC_CONFIG_DIR/app-registry.yaml",
Expand Down Expand Up @@ -2180,6 +2182,7 @@ def startOpenCloudService(service = None, name = None, environment = {}):
"detach": True,
"environment": environment,
"commands": [
INSTALL_LIBVIPS_COMMAND,
"%s %s server" % (dirs["opencloudBin"], service),
],
},
Expand All @@ -2205,7 +2208,8 @@ def build():
"name": "build",
"image": OC_CI_GOLANG,
"commands": [
"for i in $(seq 3); do make -C opencloud build && break || sleep 1; done",
"apt-get update; apt-get install libvips-dev -y",
"for i in $(seq 3); do make -C opencloud build ENABLE_VIPS=1 && break || sleep 1; done",
],
"environment": CI_HTTP_PROXY_ENV,
},
Expand Down
12 changes: 12 additions & 0 deletions tests/acceptance/expected-failures-API-on-decomposed-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ _ocdav: api compatibility, return correct status code_

- [coreApiTrashbin/trashbinSharingToShares.feature:277](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature#L277)

#### [Preview. UTF characters do not display on prievew](https://github.com/opencloud-eu/opencloud/issues/1451)

- [coreApiWebdavPreviews/previews.feature:249](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L249)
- [coreApiWebdavPreviews/previews.feature:250](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L250)
- [coreApiWebdavPreviews/previews.feature:251](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L251)

#### [Preview of text file truncated](https://github.com/opencloud-eu/opencloud/issues/1452)

- [coreApiWebdavPreviews/previews.feature:263](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L263)
- [coreApiWebdavPreviews/previews.feature:264](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L264)
- [coreApiWebdavPreviews/previews.feature:265](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L265)

### Won't fix

Not everything needs to be implemented for opencloud.
Expand Down
12 changes: 12 additions & 0 deletions tests/acceptance/expected-failures-API-on-posix-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ _ocdav: api compatibility, return correct status code_

- [coreApiTrashbin/trashbinSharingToShares.feature:277](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature#L277)

#### [Preview. UTF characters do not display on prievew](https://github.com/opencloud-eu/opencloud/issues/1451)

- [coreApiWebdavPreviews/previews.feature:249](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L249)
- [coreApiWebdavPreviews/previews.feature:250](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L250)
- [coreApiWebdavPreviews/previews.feature:251](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L251)

#### [Preview of text file truncated](https://github.com/opencloud-eu/opencloud/issues/1452)

- [coreApiWebdavPreviews/previews.feature:263](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L263)
- [coreApiWebdavPreviews/previews.feature:264](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L264)
- [coreApiWebdavPreviews/previews.feature:265](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L265)

### Won't fix

Not everything needs to be implemented for opencloud.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,18 @@
- [apiSearch1/search.feature:466](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiSearch1/search.feature#L466)
- [apiSearch1/search.feature:467](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiSearch1/search.feature#L467)


#### [Preview. UTF characters do not display on prievew](https://github.com/opencloud-eu/opencloud/issues/1451)

- [coreApiWebdavPreviews/previews.feature:249](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L249)
- [coreApiWebdavPreviews/previews.feature:250](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L250)
- [coreApiWebdavPreviews/previews.feature:251](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L251)

#### [Preview of text file truncated](https://github.com/opencloud-eu/opencloud/issues/1452)

- [coreApiWebdavPreviews/previews.feature:263](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L263)
- [coreApiWebdavPreviews/previews.feature:264](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L264)
- [coreApiWebdavPreviews/previews.feature:265](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L265)

Note: always have an empty line at the end of this file.
The bash script that processes this file requires that the last line has a newline on the end.
21 changes: 17 additions & 4 deletions tests/acceptance/features/coreApiWebdavPreviews/previews.feature
Original file line number Diff line number Diff line change
Expand Up @@ -236,21 +236,34 @@ Feature: previews of files downloaded through the webdav API
| new |
| spaces |


@need-build-with-VIPS @issue-1451
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
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

And the downloaded preview content should match with "unicode-fixture.png" fixtures preview content
Examples:
| dav-path-version |
| old |
| new |
| spaces |

@need-build-with-VIPS @issue-1452
Scenario Outline: download preview of the text file
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/lorem.txt"
When user "Alice" downloads the preview of "/lorem.txt" with width "1200" and height "1200" and processor "thumbnail" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded image should be "1200" pixels wide and "1200" pixels high
And the downloaded preview content should match with "text-file-fixture.png" fixtures preview content
Examples:
| dav-path-version |
| old |
| new |
| spaces |


Scenario Outline: updates to a file should change the preview for both sharees and sharers
Given using <dav-path-version> DAV path
Expand Down Expand Up @@ -346,7 +359,7 @@ Feature: previews of files downloaded through the webdav API
| new |
| spaces |


@need-build-with-VIPS
Scenario Outline: download previews of an image with different processors
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/testimage.jpg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ Feature: sizing of previews of files downloaded through the webdav API
| request-width | request-height | return-width | return-height | dav-path-version |
| 1 | 1 | 16 | 16 | old |
| 32 | 32 | 32 | 32 | old |
| 1024 | 1024 | 640 | 480 | old |
| 1024 | 1024 | 640 | 640 | old |
| 1 | 1024 | 16 | 16 | old |
| 1024 | 1 | 640 | 480 | old |
| 1024 | 1 | 640 | 640 | old |
| 1 | 1 | 16 | 16 | new |
| 32 | 32 | 32 | 32 | new |
| 1024 | 1024 | 640 | 480 | new |
| 1024 | 1024 | 640 | 640 | new |
| 1 | 1024 | 16 | 16 | new |
| 1024 | 1 | 640 | 480 | new |
| 1024 | 1 | 640 | 640 | new |
| 1 | 1 | 16 | 16 | spaces |
| 32 | 32 | 32 | 32 | spaces |
| 1024 | 1024 | 640 | 480 | spaces |
| 1024 | 1024 | 640 | 640 | spaces |
| 1 | 1024 | 16 | 16 | spaces |
| 1024 | 1 | 640 | 480 | spaces |
| 1024 | 1 | 640 | 640 | spaces |
Binary file modified tests/acceptance/fixtures/fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/acceptance/fixtures/fit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/acceptance/fixtures/resize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/acceptance/fixtures/text-file-fixture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/acceptance/fixtures/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/acceptance/fixtures/unicode-fixture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.