Drone: test on oldest and latest stable server#2007
Open
tobiasKaminsky wants to merge 1 commit intomasterfrom
Open
Drone: test on oldest and latest stable server#2007tobiasKaminsky wants to merge 1 commit intomasterfrom
tobiasKaminsky wants to merge 1 commit intomasterfrom
Conversation
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Expands CI coverage to run the test suite against both the oldest and latest stable Nextcloud servers, and updates integration tests to account for server-version-specific behavior.
Changes:
- Renames the existing stable Drone pipeline to target the latest stable server and adds a new oldest-stable pipeline/service.
- Adds a reusable server-version helper in the Android integration test base class.
- Adjusts several integration tests to skip or vary assertions based on Nextcloud version support.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| library/src/androidTest/java/com/owncloud/android/lib/resources/users/StatusIT.kt | Makes status assertions conditional for pre-NC21 servers. |
| library/src/androidTest/java/com/owncloud/android/lib/resources/users/DeleteE2ERemoteOperationIT.kt | Restricts the E2EE delete test to newer server versions. |
| library/src/androidTest/java/com/owncloud/android/lib/resources/files/SearchRemoteOperationIT.java | Adapts shared-search expectations for old server behavior. |
| library/src/androidTest/java/com/owncloud/android/lib/resources/files/ReadFileRemoteOperationIT.kt | Gates image-dimension assertions by server version. |
| library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java | Scopes the client-integration capability test to NC32+. |
| library/src/androidTest/java/com/owncloud/android/AbstractIT.java | Adds a helper to compare the connected server version. |
| library/src/androidTest/java/com/nextcloud/android/lib/resources/search/UnifiedSearchRemoteOperationIT.kt | Gates unified-search fileId assertions by server version. |
| library/src/androidTest/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperationIT.kt | Restricts dashboard widget test to NC25+. |
| .drone.yml | Renames the stable pipeline, bumps latest stable, and adds an oldest-stable CI job/service. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if (result.isSuccess()) { | ||
| return result.getResultData().getVersion().isNewerOrEqual(version); | ||
| } else { |
Comment on lines
+356
to
+360
| protected boolean isServerAtLeast(OwnCloudVersion version) { | ||
| final var result = new GetCapabilitiesRemoteOperation().execute(nextcloudClient); | ||
|
|
||
| if (result.isSuccess()) { | ||
| return result.getResultData().getVersion().isNewerOrEqual(version); |
| class DeleteE2ERemoteOperationIT : AbstractIT() { | ||
| @Before | ||
| fun before() { | ||
| testOnlyOnServer(NextcloudVersion.nextcloud_34) |
| @Suppress("Detekt.MagicNumber") | ||
| assertEquals(ImageDimension(451f, 529f), remoteFile.imageDimension) | ||
| if (isServerAtLeast(NextcloudVersion.nextcloud_21)) { | ||
| assertEquals(ImageDimension(451f, 529f), remoteFile.imageDimension) |
| assertEquals(fileId.toString(), firstResult?.fileId()) | ||
|
|
||
| if (isServerAtLeast(NextcloudVersion.nextcloud_21)) { | ||
| assertEquals(fileId.toString(), firstResult?.fileId()) |
| - 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 -b main https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/" |
Comment on lines
+345
to
+351
| - 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" | ||
| - 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" | ||
| - su www-data -c "php /var/www/html/occ app:enable -f photos" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.