From f72bb3f011f71b5b3f7a7abd15b804ce55aab4af Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 16:01:29 +0200 Subject: [PATCH 01/10] Drone: test on oldest and latest stable server Signed-off-by: tobiasKaminsky --- .drone.yml | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 126 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9849a3ac7..a80e60d8c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -128,7 +128,7 @@ trigger: --- kind: pipeline type: docker -name: test-stable +name: test-stable-latest steps: - name: test @@ -145,7 +145,7 @@ steps: from_secret: GIT_TOKEN commands: - emulator -avd android -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 & - - sed -i s"#server#server-stable#" gradle.properties + - sed -i s"#server#server-stable-latest#" gradle.properties - sed -i s"#1#5#" ./library/src/androidTest/java/com/owncloud/android/RetryTestRule.kt - ./gradlew assembleDebug - ./scripts/wait_for_emulator.sh @@ -184,10 +184,10 @@ steps: - stable-* services: - - name: server-stable + - name: server-stable-latest image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest environment: - SERVER_VERSION: stable32 + SERVER_VERSION: stable33 commands: - rm /etc/apt/sources.list.d/php.list - apt-get update && apt-get install -y composer @@ -248,6 +248,128 @@ trigger: - push - pull_request --- +kind: pipeline +type: docker +name: test-stable-oldest + +steps: + - name: test + image: ghcr.io/nextcloud/continuous-integration-android8:4 + privileged: true + environment: + LOG_USERNAME: + from_secret: LOG_USERNAME + LOG_PASSWORD: + from_secret: LOG_PASSWORD + GIT_USERNAME: + from_secret: GIT_USERNAME + GIT_TOKEN: + from_secret: GIT_TOKEN + commands: + - emulator -avd android -no-snapshot -gpu swiftshader_indirect -no-window -no-audio -skin 500x833 & + - sed -i s"#server#server-stable-oldest#" gradle.properties + - sed -i s"#1#5#" ./library/src/androidTest/java/com/owncloud/android/RetryTestRule.kt + - ./gradlew assembleDebug + - ./scripts/wait_for_emulator.sh + - ./scripts/wait_for_server.sh server-stable + - scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - ./gradlew installDebugAndroidTest + - ./gradlew createDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - ./gradlew combinedTestReport + - curl -Os https://uploader.codecov.io/latest/linux/codecov + - chmod +x codecov + - ./codecov -t 2eec98c3-ff20-4cad-9e08-463471a33431 + + - name: notify + image: drillster/drone-email + settings: + port: 587 + from: nextcloud-drone@kaminsky.me + recipients_only: true + username: + from_secret: EMAIL_USERNAME + password: + from_secret: EMAIL_PASSWORD + recipients: + from_secret: EMAIL_RECIPIENTS + host: + from_secret: EMAIL_HOST + when: + event: + - push + status: + - failure + branch: + - master + - stable-* + +services: + - name: server-stable-oldest + image: ghcr.io/nextcloud/continuous-integration-shallow-server@sha256:51d2afe82596956558322235c1339c68705e234e9fd52a90111c01278bdb2bd2 + environment: + SERVER_VERSION: stable20 + commands: + - rm /etc/apt/sources.list.d/php.list + - apt-get update && apt-get install -y composer + - mkdir /var/www/.nvm /var/www/.npm; touch /var/www/.bashrc; chown -R 33:33 /var/www/.nvm /var/www/.npm /var/www/.bashrc + - su www-data -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash" + - su www-data -c "source ~/.bashrc; nvm install node" + - BRANCH="$SERVER_VERSION" /usr/local/bin/initnc.sh + - su www-data -c "php /var/www/html/occ log:manage --level warning" + - su www-data -c "OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1" + - su www-data -c "OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2" + - su www-data -c "OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3" + - su www-data -c "OC_PASS=test php /var/www/html/occ user:add --password-from-env --display-name='Test@Test' test@test" + - su www-data -c "OC_PASS=test php /var/www/html/occ user:add --password-from-env --display-name='Test Spaces' 'test test'" + - su www-data -c "php /var/www/html/occ user:setting user2 files quota 1G" + - su www-data -c "php /var/www/html/occ group:add users" + - su www-data -c "php /var/www/html/occ group:adduser users user1" + - su www-data -c "php /var/www/html/occ group:adduser users user2" + - su www-data -c "php /var/www/html/occ group:adduser users test" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/activity.git /var/www/html/apps/activity/" + - su www-data -c "php /var/www/html/occ app:enable activity" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/text.git /var/www/html/apps/text/" + - su www-data -c "php /var/www/html/occ app:enable text" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/end_to_end_encryption.git /var/www/html/apps/end_to_end_encryption/" + - su www-data -c "php /var/www/html/occ app:enable end_to_end_encryption" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/password_policy.git /var/www/html/apps/password_policy/" + - su www-data -c "php /var/www/html/occ app:enable password_policy" + - su www-data -c "php /var/www/html/occ app:enable external" + - su www-data -c 'php /var/www/html/occ config:app:set external sites --value="{\"1\":{\"id\":1,\"name\":\"Nextcloud\",\"url\":\"https:\/\/www.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false},\"2\":{\"id\":2,\"name\":\"Forum\",\"url\":\"https:\/\/help.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false}}"' + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/files_lock.git /var/www/html/apps/files_lock/" + - su www-data -c "php /var/www/html/occ app:enable files_lock" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/groupfolders.git /var/www/html/apps/groupfolders/" + - su www-data -c "php /var/www/html/occ app:enable -f groupfolders" + - su www-data -c "php /var/www/html/occ groupfolders:create groupfolder" + - su www-data -c "php /var/www/html/occ groupfolders:group 1 users" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/" + - su www-data -c "cd /var/www/html/apps/notifications; composer install --no-dev" + - su www-data -c "php /var/www/html/occ app:enable -f notifications" + - su www-data -c "php /var/www/html/occ notification:generate test test" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/photos.git /var/www/html/apps/photos/" + - su www-data -c "cd /var/www/html/apps/photos; composer install --no-dev" + - su www-data -c "php /var/www/html/occ app:enable -f photos" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" + - su www-data -c "cd /var/www/html/apps/assistant; source ~/.bashrc; composer install --no-dev" + - su www-data -c "php /var/www/html/occ app:enable assistant" + - su www-data -c "php /var/www/html/occ app:enable -f testing" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/files_downloadlimit.git /var/www/html/apps/files_downloadlimit/" + - su www-data -c "php /var/www/html/occ app:enable -f files_downloadlimit" + - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/recommendations.git /var/www/html/apps/recommendations/" + - su www-data -c "php /var/www/html/occ app:enable recommendations" + - su www-data -c "php /var/www/html/occ config:system:set ratelimit.protection.enabled --value false --type bool" + - /usr/local/bin/run.sh + +trigger: + branch: + - master + - stable-* + event: + - push + - pull_request +--- kind: signature hmac: d51bba0f9e5754b040cc2a99847a261a21e283074dabffa811f0c0eaf11f6968 From f913e2117bf3d12a8c10f8f3497677be3b60b749 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 16:01:29 +0200 Subject: [PATCH 02/10] Drone: test on oldest and latest stable server Signed-off-by: tobiasKaminsky --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a80e60d8c..a1c404f48 100644 --- a/.drone.yml +++ b/.drone.yml @@ -371,6 +371,6 @@ trigger: - pull_request --- kind: signature -hmac: d51bba0f9e5754b040cc2a99847a261a21e283074dabffa811f0c0eaf11f6968 +hmac: d0e52f2475fcb45e591f4bc5d44618ff48528c109294e1d58c237add521d0b51 ... From 67fdb558987de897657e3840a5fe24c2f6988001 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 16:53:57 +0200 Subject: [PATCH 03/10] use stable20 Signed-off-by: tobiasKaminsky --- .drone.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index a1c404f48..a4302ab05 100644 --- a/.drone.yml +++ b/.drone.yml @@ -307,7 +307,7 @@ steps: services: - name: server-stable-oldest - image: ghcr.io/nextcloud/continuous-integration-shallow-server@sha256:51d2afe82596956558322235c1339c68705e234e9fd52a90111c01278bdb2bd2 + image: ghcr.io/nextcloud/continuous-integration-shallow-server-php7.4:1 environment: SERVER_VERSION: stable20 commands: @@ -338,25 +338,18 @@ services: - su www-data -c "php /var/www/html/occ app:enable password_policy" - su www-data -c "php /var/www/html/occ app:enable external" - su www-data -c 'php /var/www/html/occ config:app:set external sites --value="{\"1\":{\"id\":1,\"name\":\"Nextcloud\",\"url\":\"https:\/\/www.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false},\"2\":{\"id\":2,\"name\":\"Forum\",\"url\":\"https:\/\/help.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false}}"' - - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/files_lock.git /var/www/html/apps/files_lock/" - - su www-data -c "php /var/www/html/occ app:enable files_lock" - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/groupfolders.git /var/www/html/apps/groupfolders/" - su www-data -c "php /var/www/html/occ app:enable -f groupfolders" - su www-data -c "php /var/www/html/occ groupfolders:create groupfolder" - su www-data -c "php /var/www/html/occ groupfolders:group 1 users" - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/" - - su www-data -c "cd /var/www/html/apps/notifications; composer install --no-dev" + - su www-data -c "cd /var/www/html/apps/notifications" - su www-data -c "php /var/www/html/occ app:enable -f notifications" - su www-data -c "php /var/www/html/occ notification:generate test test" - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/photos.git /var/www/html/apps/photos/" - - su www-data -c "cd /var/www/html/apps/photos; composer install --no-dev" + - su www-data -c "cd /var/www/html/apps/photos" - su www-data -c "php /var/www/html/occ app:enable -f photos" - - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" - - su www-data -c "cd /var/www/html/apps/assistant; source ~/.bashrc; composer install --no-dev" - - su www-data -c "php /var/www/html/occ app:enable assistant" - su www-data -c "php /var/www/html/occ app:enable -f testing" - - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/files_downloadlimit.git /var/www/html/apps/files_downloadlimit/" - - su www-data -c "php /var/www/html/occ app:enable -f files_downloadlimit" - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/recommendations.git /var/www/html/apps/recommendations/" - su www-data -c "php /var/www/html/occ app:enable recommendations" - su www-data -c "php /var/www/html/occ config:system:set ratelimit.protection.enabled --value false --type bool" @@ -371,6 +364,6 @@ trigger: - pull_request --- kind: signature -hmac: d0e52f2475fcb45e591f4bc5d44618ff48528c109294e1d58c237add521d0b51 +hmac: 1beebdbec1e86c50c861349ad0db285d191f4d61bcad489e103b404b52961a34 ... From 3b1dfd223046978e7e76a1114b6becae77b3b773 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 16:58:28 +0200 Subject: [PATCH 04/10] use stable20 Signed-off-by: tobiasKaminsky --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index a4302ab05..9c812147b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -149,7 +149,7 @@ steps: - sed -i s"#1#5#" ./library/src/androidTest/java/com/owncloud/android/RetryTestRule.kt - ./gradlew assembleDebug - ./scripts/wait_for_emulator.sh - - ./scripts/wait_for_server.sh server-stable + - ./scripts/wait_for_server.sh server-stable-latest - scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN @@ -271,7 +271,7 @@ steps: - sed -i s"#1#5#" ./library/src/androidTest/java/com/owncloud/android/RetryTestRule.kt - ./gradlew assembleDebug - ./scripts/wait_for_emulator.sh - - ./scripts/wait_for_server.sh server-stable + - ./scripts/wait_for_server.sh server-stable-oldest - scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN @@ -364,6 +364,6 @@ trigger: - pull_request --- kind: signature -hmac: 1beebdbec1e86c50c861349ad0db285d191f4d61bcad489e103b404b52961a34 +hmac: 9105b6314e264fffc7f46a6b5daf9469da42e682e059fd97255286466ca8fb1c ... From 06bc16ef3b380ababe81ecd1cc89e2edb503de39 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 17:24:13 +0200 Subject: [PATCH 05/10] use stable20 Signed-off-by: tobiasKaminsky --- .drone.yml | 20 +++++++++---------- ...ashboardGetWidgetItemsRemoteOperationIT.kt | 3 +++ .../GetCapabilitiesRemoteOperationIT.java | 3 +++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9c812147b..1118d0e9f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -150,11 +150,11 @@ steps: - ./gradlew assembleDebug - ./scripts/wait_for_emulator.sh - ./scripts/wait_for_server.sh server-stable-latest - - scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - - scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - - ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - scripts/deleteOutdatedComments.sh "stable-latest" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - scripts/deleteOutdatedComments.sh "stable-latest" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable-latest" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - ./gradlew installDebugAndroidTest - - ./gradlew createDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - ./gradlew createDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable-latest" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - ./gradlew combinedTestReport - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov @@ -187,7 +187,7 @@ services: - name: server-stable-latest image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest environment: - SERVER_VERSION: stable33 + SERVER_VERSION: stable32 commands: - rm /etc/apt/sources.list.d/php.list - apt-get update && apt-get install -y composer @@ -229,7 +229,7 @@ services: - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/photos.git /var/www/html/apps/photos/" - su www-data -c "cd /var/www/html/apps/photos; composer install --no-dev" - su www-data -c "php /var/www/html/occ app:enable -f photos" - - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" + - su www-data -c "git clone --depth 1 https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" - su www-data -c "cd /var/www/html/apps/assistant; source ~/.bashrc; composer install --no-dev" - su www-data -c "php /var/www/html/occ app:enable assistant" - su www-data -c "php /var/www/html/occ app:enable -f testing" @@ -272,11 +272,11 @@ steps: - ./gradlew assembleDebug - ./scripts/wait_for_emulator.sh - ./scripts/wait_for_server.sh server-stable-oldest - - scripts/deleteOutdatedComments.sh "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - - scripts/deleteOutdatedComments.sh "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - - ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - scripts/deleteOutdatedComments.sh "stable-oldest" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - scripts/deleteOutdatedComments.sh "stable-oldest" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - ./gradlew jacocoTestDebugUnitTestReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable-oldest" "Unit" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - ./gradlew installDebugAndroidTest - - ./gradlew createDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN + - ./gradlew createDebugCoverageReport || scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "stable-oldest" "IT" $DRONE_PULL_REQUEST $GIT_USERNAME $GIT_TOKEN - ./gradlew combinedTestReport - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov diff --git a/library/src/androidTest/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperationIT.kt b/library/src/androidTest/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperationIT.kt index a2e9aed38..680c5ef52 100644 --- a/library/src/androidTest/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperationIT.kt +++ b/library/src/androidTest/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperationIT.kt @@ -52,6 +52,9 @@ class DashboardGetWidgetItemsRemoteOperationIT : AbstractIT() { @Test fun getEmptyItems() { + // only on NC25+ + testOnlyOnServer(NextcloudVersion.nextcloud_25) + val widgetId = "nonExistingWidget" val result = DashboardGetWidgetItemsRemoteOperation(widgetId, LIMIT_SIZE).execute(nextcloudClient) diff --git a/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java b/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java index 1c58ed18a..fb1f2fa15 100644 --- a/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java +++ b/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java @@ -165,6 +165,9 @@ private void checkCapability(OCCapability capability, String userId) { @Test public void testClientIntegration() { + // only on NC32+ + testOnlyOnServer(NextcloudVersion.nextcloud_32); + // get capabilities RemoteOperationResult result = new GetCapabilitiesRemoteOperation().execute(nextcloudClient); assertTrue(result.isSuccess()); From 9cc1628af729b8e5b732d0337a6c9fde7ef2b3cb Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 17:24:31 +0200 Subject: [PATCH 06/10] use stable20 Signed-off-by: tobiasKaminsky --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1118d0e9f..af786702a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -364,6 +364,6 @@ trigger: - pull_request --- kind: signature -hmac: 9105b6314e264fffc7f46a6b5daf9469da42e682e059fd97255286466ca8fb1c +hmac: 2989789c55e48203877fd375190326ca816c47b754b9d45534703a2f0aaf96fb ... From 84bfdc19ce7c3e16b42f93975e338651a2cb1937 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 17:31:42 +0200 Subject: [PATCH 07/10] use stable20 Signed-off-by: tobiasKaminsky --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index af786702a..50f569bf2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -107,7 +107,7 @@ services: - su www-data -c "git clone --depth 1 https://github.com/nextcloud/photos.git /var/www/html/apps/photos/" - su www-data -c "cd /var/www/html/apps/photos; composer install --no-dev" - su www-data -c "php /var/www/html/occ app:enable -f photos" - - su www-data -c "git clone --depth 1 https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" + - su www-data -c "git clone --depth 1 -b main https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" - su www-data -c "cd /var/www/html/apps/assistant; source ~/.bashrc; composer install --no-dev" - su www-data -c "php /var/www/html/occ app:enable -f assistant" - su www-data -c "php /var/www/html/occ app:enable -f testing" @@ -364,6 +364,6 @@ trigger: - pull_request --- kind: signature -hmac: 2989789c55e48203877fd375190326ca816c47b754b9d45534703a2f0aaf96fb +hmac: 242dd823e43429cdcc284b604e9284651c38c270002ce05e4fa930ee6041645d ... From 1c193d37feb494da994cfb00c682f1f63b4a5b16 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 17:37:23 +0200 Subject: [PATCH 08/10] use stable20 Signed-off-by: tobiasKaminsky --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 50f569bf2..a8ad2a451 100644 --- a/.drone.yml +++ b/.drone.yml @@ -229,7 +229,7 @@ services: - su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/photos.git /var/www/html/apps/photos/" - su www-data -c "cd /var/www/html/apps/photos; composer install --no-dev" - su www-data -c "php /var/www/html/occ app:enable -f photos" - - su www-data -c "git clone --depth 1 https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" + - su www-data -c "git clone --depth 1 -b main https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" - su www-data -c "cd /var/www/html/apps/assistant; source ~/.bashrc; composer install --no-dev" - su www-data -c "php /var/www/html/occ app:enable assistant" - su www-data -c "php /var/www/html/occ app:enable -f testing" @@ -364,6 +364,6 @@ trigger: - pull_request --- kind: signature -hmac: 242dd823e43429cdcc284b604e9284651c38c270002ce05e4fa930ee6041645d +hmac: 764d4af282a5c8e9be4ecec3932cf07984206a734c179c370fca8d43bc30f586 ... From 35005751a099c7396c41204e6f82f2caa8f1f98f Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 4 May 2026 17:42:26 +0200 Subject: [PATCH 09/10] use stable20 Signed-off-by: tobiasKaminsky --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index a8ad2a451..d3b94ec1c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -187,7 +187,7 @@ services: - name: server-stable-latest image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest environment: - SERVER_VERSION: stable32 + SERVER_VERSION: stable33 commands: - rm /etc/apt/sources.list.d/php.list - apt-get update && apt-get install -y composer @@ -364,6 +364,6 @@ trigger: - pull_request --- kind: signature -hmac: 764d4af282a5c8e9be4ecec3932cf07984206a734c179c370fca8d43bc30f586 +hmac: b26e47fc03b18d8521973aa42f47b82f98b0c61c1836a99e454e9792dbee02ae ... From 8184ef8b326b12b03047a7ef24b2247114c08cd1 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 5 May 2026 08:35:56 +0200 Subject: [PATCH 10/10] use stable20 Signed-off-by: tobiasKaminsky --- .../search/UnifiedSearchRemoteOperationIT.kt | 6 +++++- .../java/com/owncloud/android/AbstractIT.java | 11 ++++++++++- .../lib/resources/files/ReadFileRemoteOperationIT.kt | 4 +++- .../lib/resources/files/SearchRemoteOperationIT.java | 12 +++++++++++- .../resources/users/DeleteE2ERemoteOperationIT.kt | 7 +++++++ .../owncloud/android/lib/resources/users/StatusIT.kt | 9 ++++++++- 6 files changed, 44 insertions(+), 5 deletions(-) diff --git a/library/src/androidTest/java/com/nextcloud/android/lib/resources/search/UnifiedSearchRemoteOperationIT.kt b/library/src/androidTest/java/com/nextcloud/android/lib/resources/search/UnifiedSearchRemoteOperationIT.kt index 4691e6ed2..17962eed6 100644 --- a/library/src/androidTest/java/com/nextcloud/android/lib/resources/search/UnifiedSearchRemoteOperationIT.kt +++ b/library/src/androidTest/java/com/nextcloud/android/lib/resources/search/UnifiedSearchRemoteOperationIT.kt @@ -11,6 +11,7 @@ import com.owncloud.android.AbstractIT import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation import com.owncloud.android.lib.resources.files.ReadFileRemoteOperation import com.owncloud.android.lib.resources.files.model.RemoteFile +import com.owncloud.android.lib.resources.status.NextcloudVersion import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertNotNull @@ -62,7 +63,10 @@ class UnifiedSearchRemoteOperationIT : AbstractIT() { assertNotNull(firstResult) assertEquals(remotePath, firstResult?.remotePath()) - assertEquals(fileId.toString(), firstResult?.fileId()) + + if (isServerAtLeast(NextcloudVersion.nextcloud_21)) { + assertEquals(fileId.toString(), firstResult?.fileId()) + } } @Test diff --git a/library/src/androidTest/java/com/owncloud/android/AbstractIT.java b/library/src/androidTest/java/com/owncloud/android/AbstractIT.java index 5d4e543a7..59a163689 100644 --- a/library/src/androidTest/java/com/owncloud/android/AbstractIT.java +++ b/library/src/androidTest/java/com/owncloud/android/AbstractIT.java @@ -36,7 +36,6 @@ import com.owncloud.android.lib.resources.files.model.RemoteFile; import com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation; import com.owncloud.android.lib.resources.status.GetStatusRemoteOperation; -import com.owncloud.android.lib.resources.status.OCCapability; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import org.apache.commons.httpclient.HttpStatus; @@ -353,4 +352,14 @@ protected void testOnlyOnServer(OwnCloudVersion version) { assumeFalse(true); } } + + protected boolean isServerAtLeast(OwnCloudVersion version) { + final var result = new GetCapabilitiesRemoteOperation().execute(nextcloudClient); + + if (result.isSuccess()) { + return result.getResultData().getVersion().isNewerOrEqual(version); + } else { + return false; + } + } } diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/files/ReadFileRemoteOperationIT.kt b/library/src/androidTest/java/com/owncloud/android/lib/resources/files/ReadFileRemoteOperationIT.kt index 03d013b25..1b7c5c5a8 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/files/ReadFileRemoteOperationIT.kt +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/files/ReadFileRemoteOperationIT.kt @@ -114,7 +114,9 @@ class ReadFileRemoteOperationIT : AbstractIT() { val remoteFile = result.data[0] as RemoteFile @Suppress("Detekt.MagicNumber") - assertEquals(ImageDimension(451f, 529f), remoteFile.imageDimension) + if (isServerAtLeast(NextcloudVersion.nextcloud_21)) { + assertEquals(ImageDimension(451f, 529f), remoteFile.imageDimension) + } testOnlyOnServer(NextcloudVersion.nextcloud_27) diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/files/SearchRemoteOperationIT.java b/library/src/androidTest/java/com/owncloud/android/lib/resources/files/SearchRemoteOperationIT.java index 7ff006ffd..75829c883 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/files/SearchRemoteOperationIT.java +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/files/SearchRemoteOperationIT.java @@ -24,6 +24,7 @@ import com.owncloud.android.lib.resources.shares.CreateShareRemoteOperation; import com.owncloud.android.lib.resources.shares.ShareType; import com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation; +import com.owncloud.android.lib.resources.status.NextcloudVersion; import com.owncloud.android.lib.resources.status.OCCapability; import org.junit.BeforeClass; @@ -200,7 +201,16 @@ public void favoriteFiles() throws IOException { assertEquals(2, result.getResultData().size()); assertEquals(remotePath, result.getResultData().get(0).getRemotePath()); - assertEquals(sharedRemotePath, result.getResultData().get(1).getRemotePath()); + + String expectedSharedRemotePath; + if (isServerAtLeast(NextcloudVersion.nextcloud_21)) { + expectedSharedRemotePath = sharedRemotePath; + } else { + // Bug: shared search ends with "/" even for files + expectedSharedRemotePath = sharedRemotePath + "/"; + } + assertEquals(expectedSharedRemotePath, result.getResultData().get(1).getRemotePath()); + } /** diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/users/DeleteE2ERemoteOperationIT.kt b/library/src/androidTest/java/com/owncloud/android/lib/resources/users/DeleteE2ERemoteOperationIT.kt index fbf6e48d3..60c286a49 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/users/DeleteE2ERemoteOperationIT.kt +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/users/DeleteE2ERemoteOperationIT.kt @@ -9,10 +9,17 @@ package com.owncloud.android.lib.resources.users import com.owncloud.android.AbstractIT import com.owncloud.android.lib.resources.e2ee.DeleteEncryptedFilesRemoteOperation +import com.owncloud.android.lib.resources.status.NextcloudVersion import junit.framework.TestCase.assertTrue +import org.junit.Before import org.junit.Test class DeleteE2ERemoteOperationIT : AbstractIT() { + @Before + fun before() { + testOnlyOnServer(NextcloudVersion.nextcloud_34) + } + @Test fun testDeleteEncryptedFiles() { val sut = DeleteEncryptedFilesRemoteOperation() diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/users/StatusIT.kt b/library/src/androidTest/java/com/owncloud/android/lib/resources/users/StatusIT.kt index 2f11844ff..f3194214b 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/users/StatusIT.kt +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/users/StatusIT.kt @@ -8,6 +8,7 @@ package com.owncloud.android.lib.resources.users import com.owncloud.android.AbstractIT +import com.owncloud.android.lib.resources.status.NextcloudVersion import com.owncloud.android.lib.resources.status.OwnCloudVersion import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue @@ -40,7 +41,13 @@ class StatusIT : AbstractIT() { val result0 = SetStatusRemoteOperation(StatusType.ONLINE).execute(nextcloudClient) assertTrue("SetStatusRemoteOperation failed: " + result0.logMessage, result0.isSuccess) - for (statusType in StatusType.values()) { + val status = StatusType.entries.toMutableList() + + if (!isServerAtLeast(NextcloudVersion.nextcloud_21)) { + status.remove(StatusType.BUSY) + } + + for (statusType in status) { val result1 = GetStatusRemoteOperation().run(nextcloudClient) assertTrue("GetStatusRemoteOperation failed: " + result1.logMessage, result1.isSuccess)