[full-ci] run tests with VIPS enabled (#1420)
* [full-ci] run tests with VIPS enabled * fix * fix --------- Co-authored-by: Viktor Scharf <v.scharf@opencloud.eu>
@@ -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",
|
||||
@@ -2166,6 +2167,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",
|
||||
@@ -2209,6 +2211,7 @@ def startOpenCloudService(service = None, name = None, environment = {}):
|
||||
"detach": True,
|
||||
"environment": environment,
|
||||
"commands": [
|
||||
INSTALL_LIBVIPS_COMMAND,
|
||||
"%s %s server" % (dirs["opencloudBin"], service),
|
||||
],
|
||||
},
|
||||
@@ -2234,7 +2237,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,
|
||||
},
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -236,14 +236,13 @@ 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
|
||||
And the downloaded preview content should match with "unicode-fixture.png" fixtures preview content
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
@@ -251,6 +250,20 @@ Feature: previews of files downloaded through the webdav API
|
||||
| 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
|
||||
@@ -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"
|
||||
|
||||
@@ -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 |
|
||||
|
||||
|
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 966 B |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 802 B |
|
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 942 B |
BIN
tests/acceptance/fixtures/text-file-fixture.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 837 B After Width: | Height: | Size: 966 B |
|
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 715 B |