aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-10-28 11:32:15 +0100
committerGitHub <noreply@github.com>2024-10-28 11:32:15 +0100
commit86006368bf596a98e1cdf4ec7a13e3446456585c (patch)
tree5a2875aff77c3a96a29708089f28a5608a937b63 /tests
parent5efb175665a71ac32fb6a6d5a141c72d12e8534c (diff)
parent220bd3422f7bcc3e9a757dbb4b753b8954eb36b6 (diff)
downloadnextcloud-server-86006368bf596a98e1cdf4ec7a13e3446456585c.tar.gz
nextcloud-server-86006368bf596a98e1cdf4ec7a13e3446456585c.zip
Merge pull request #48912 from nextcloud/bugfix/exception-appscreenshot-notstring
fix(apps-store): Fix exception on generating preview url for installed app screenshot
Diffstat (limited to 'tests')
-rw-r--r--tests/data/app/expected-info.json4
-rw-r--r--tests/data/app/various-single-item.json50
-rw-r--r--tests/data/app/various-single-item.json.license2
-rw-r--r--tests/data/app/various-single-item.xml22
-rw-r--r--tests/lib/App/InfoParserTest.php1
5 files changed, 78 insertions, 1 deletions
diff --git a/tests/data/app/expected-info.json b/tests/data/app/expected-info.json
index c3ea27af7d3..40ba6104104 100644
--- a/tests/data/app/expected-info.json
+++ b/tests/data/app/expected-info.json
@@ -6,7 +6,9 @@
"name": "Server-side Encryption",
"description": "\n\tThis application encrypts all files accessed by ownCloud at rest, wherever they are stored. As an example, with this application enabled, external cloud based Amazon S3 storage will be encrypted, protecting this data on storage outside of the control of the Admin. When this application is enabled for the first time, all files are encrypted as users log in and are prompted for their password. The recommended recovery key option enables recovery of files in case the key is lost. \n\tNote that this app encrypts all files that are touched by ownCloud, so external storage providers and applications such as SharePoint will see new files encrypted when they are accessed. Encryption is based on AES 128 or 256 bit keys. More information is available in the Encryption documentation \n\t",
"licence": "AGPL",
- "author": "Sam Tuke, Bjoern Schiessle, Florin Peter",
+ "author": [
+ "Sam Tuke, Bjoern Schiessle, Florin Peter"
+ ],
"requiremin": "4",
"shipped": "true",
"documentation": {
diff --git a/tests/data/app/various-single-item.json b/tests/data/app/various-single-item.json
new file mode 100644
index 00000000000..ae5e751ab49
--- /dev/null
+++ b/tests/data/app/various-single-item.json
@@ -0,0 +1,50 @@
+{
+ "id": "notifications",
+ "name": "Notifications",
+ "description": "A single screenshot should be an array",
+ "version": "1.0.0",
+ "licence": "agpl",
+ "author": [
+ "Joas Schilling"
+ ],
+ "dependencies": {
+ "nextcloud": {
+ "@attributes": {
+ "min-version": "16",
+ "max-version": "16"
+ }
+ },
+ "backend": []
+ },
+ "screenshot": [
+ "https://raw.githubusercontent.com/nextcloud/notifications/refs/heads/master/docs/screenshot.png"
+ ],
+ "category": [
+ "monitoring"
+ ],
+ "info": [],
+ "background-jobs": [],
+ "activity": {
+ "filters": [],
+ "settings": [],
+ "providers": []
+ },
+ "commands": [],
+ "remote": [],
+ "public": [],
+ "repair-steps": {
+ "install": [],
+ "pre-migration": [],
+ "post-migration": [],
+ "live-migration": [],
+ "uninstall": []
+ },
+ "settings": {
+ "admin": [],
+ "admin-section": [],
+ "personal": [],
+ "personal-section": []
+ },
+ "two-factor-providers": [],
+ "types": []
+}
diff --git a/tests/data/app/various-single-item.json.license b/tests/data/app/various-single-item.json.license
new file mode 100644
index 00000000000..84f7e70446e
--- /dev/null
+++ b/tests/data/app/various-single-item.json.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/tests/data/app/various-single-item.xml b/tests/data/app/various-single-item.xml
new file mode 100644
index 00000000000..cb9595516e1
--- /dev/null
+++ b/tests/data/app/various-single-item.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+ - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ - SPDX-License-Identifier: AGPL-3.0-or-later
+-->
+<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
+ <id>notifications</id>
+ <name>Notifications</name>
+ <description>A single screenshot should be an array</description>
+ <version>1.0.0</version>
+ <licence>agpl</licence>
+ <author>Joas Schilling</author>
+
+ <category>monitoring</category>
+
+ <screenshot>https://raw.githubusercontent.com/nextcloud/notifications/refs/heads/master/docs/screenshot.png</screenshot>
+
+ <dependencies>
+ <nextcloud min-version="16" max-version="16"/>
+ </dependencies>
+</info>
diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php
index 66ff10266e2..1c429ccc405 100644
--- a/tests/lib/App/InfoParserTest.php
+++ b/tests/lib/App/InfoParserTest.php
@@ -53,6 +53,7 @@ class InfoParserTest extends TestCase {
[null, 'invalid-info.xml'],
['navigation-one-item.json', 'navigation-one-item.xml'],
['navigation-two-items.json', 'navigation-two-items.xml'],
+ ['various-single-item.json', 'various-single-item.xml'],
];
}
}