Skip to content

Commit

Permalink
Merge pull request #1053 from nextcloud/backport/1047/stable-2.14
Browse files Browse the repository at this point in the history
[stable-2.14] Drone: update server images to use PHP 8
  • Loading branch information
AlvaroBrey authored Feb 1, 2023
2 parents ce85d5e + 155a44b commit 3b0c9f1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ steps:

services:
- name: server-master
image: ghcr.io/nextcloud/continuous-integration-server:latest
image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest
commands:
- apt-get update && apt-get install -y composer
- /usr/local/bin/initnc.sh
Expand Down Expand Up @@ -154,7 +154,7 @@ steps:

services:
- name: server-stable
image: ghcr.io/nextcloud/continuous-integration-server:latest
image: ghcr.io/nextcloud/continuous-integration-shallow-server:latest
environment:
SERVER_VERSION: stable24
commands:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ package com.owncloud.android.lib.resources.files

import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.resources.files.model.RemoteFile
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.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
Expand All @@ -49,7 +52,15 @@ class ReadFileVersionsRemoteOperationIT : AbstractIT() {
var sutResult = ReadFileVersionsRemoteOperation(remoteFile.localId).execute(client)

assertTrue(sutResult.isSuccess)
assertEquals(0, sutResult.data.size)

var versionCount = 0
val ocCapability = GetCapabilitiesRemoteOperation()
.execute(nextcloudClient).singleData as OCCapability
if (ocCapability.version.isNewerOrEqual(NextcloudVersion.nextcloud_26)) {
// with NC26+ we always have a starting version
versionCount++
}
assertEquals(versionCount, sutResult.data.size)

// modify file to have a version
FileWriter(txtFile).apply {
Expand All @@ -73,6 +84,8 @@ class ReadFileVersionsRemoteOperationIT : AbstractIT() {
sutResult = ReadFileVersionsRemoteOperation(remoteFile.localId).execute(client)

assertTrue(sutResult.isSuccess)
assertEquals(1, sutResult.data.size)

versionCount++
assertEquals(versionCount, sutResult.data.size)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NextcloudVersion : OwnCloudVersion {
val nextcloud_25 = NextcloudVersion(0x19000000) // 25.0

@JvmField
val nextcloud_26 = NextcloudVersion(0x1A000000) // 25.0
val nextcloud_26 = NextcloudVersion(0x1A000000) // 26.0
}

constructor(string: String) : super(string)
Expand Down

0 comments on commit 3b0c9f1

Please sign in to comment.