diff --git a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingCreateFileRemoteOperationIT.java b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingCreateFileRemoteOperationIT.java index 6d30c7e01..c3aac0104 100644 --- a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingCreateFileRemoteOperationIT.java +++ b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingCreateFileRemoteOperationIT.java @@ -12,10 +12,17 @@ import com.owncloud.android.AbstractIT; import com.owncloud.android.lib.common.operations.RemoteOperationResult; +import com.owncloud.android.lib.resources.status.OwnCloudVersion; +import org.junit.BeforeClass; import org.junit.Test; public class DirectEditingCreateFileRemoteOperationIT extends AbstractIT { + @BeforeClass + public static void beforeClass() { + testOnlyOnServer(OwnCloudVersion.nextcloud_18); + } + @Test public void createEmptyFile() { RemoteOperationResult result = new DirectEditingCreateFileRemoteOperation("/test.md", diff --git a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainListOfTemplatesRemoteOperationIT.java b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainListOfTemplatesRemoteOperationIT.java index 05efbd44c..7b73b43e1 100644 --- a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainListOfTemplatesRemoteOperationIT.java +++ b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainListOfTemplatesRemoteOperationIT.java @@ -13,10 +13,16 @@ import com.owncloud.android.AbstractIT; import com.owncloud.android.lib.common.TemplateList; import com.owncloud.android.lib.common.operations.RemoteOperationResult; +import com.owncloud.android.lib.resources.status.OwnCloudVersion; +import org.junit.BeforeClass; import org.junit.Test; public class DirectEditingObtainListOfTemplatesRemoteOperationIT extends AbstractIT { + @BeforeClass + public static void beforeClass() { + testOnlyOnServer(OwnCloudVersion.nextcloud_18); + } @Test public void testGetAll() { diff --git a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainRemoteOperationIT.kt b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainRemoteOperationIT.kt index 6e11c69f0..a21883c01 100644 --- a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainRemoteOperationIT.kt +++ b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingObtainRemoteOperationIT.kt @@ -8,13 +8,20 @@ package com.nextcloud.android.lib.resources.directediting import com.owncloud.android.AbstractIT +import com.owncloud.android.lib.resources.status.OwnCloudVersion import junit.framework.Assert.assertEquals import junit.framework.Assert.assertFalse import junit.framework.Assert.assertNotNull import junit.framework.Assert.assertTrue +import org.junit.Before import org.junit.Test class DirectEditingObtainRemoteOperationIT : AbstractIT() { + @Before + fun before() { + testOnlyOnServer(OwnCloudVersion.nextcloud_18) + } + @Test fun testGetAll() { val result = DirectEditingObtainRemoteOperation().execute(client) diff --git a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingOpenFileRemoteOperationIT.java b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingOpenFileRemoteOperationIT.java index 080355271..7cbe51323 100644 --- a/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingOpenFileRemoteOperationIT.java +++ b/library/src/androidTest/java/com/nextcloud/android/lib/resources/directediting/DirectEditingOpenFileRemoteOperationIT.java @@ -14,14 +14,21 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.resources.files.ReadFileRemoteOperation; import com.owncloud.android.lib.resources.files.UploadFileRemoteOperation; +import com.owncloud.android.lib.resources.status.OwnCloudVersion; import junit.framework.TestCase; +import org.junit.BeforeClass; import org.junit.Test; import java.io.IOException; public class DirectEditingOpenFileRemoteOperationIT extends AbstractIT { + @BeforeClass + public static void beforeClass() { + testOnlyOnServer(OwnCloudVersion.nextcloud_18); + } + @Test public void openFile() throws IOException { // create file 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 5f78c913c..721cdf00d 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,10 +11,12 @@ 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.OwnCloudVersion import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertNotNull import org.junit.Assert.assertTrue +import org.junit.BeforeClass import org.junit.Test class UnifiedSearchRemoteOperationIT : AbstractIT() { @@ -76,4 +78,12 @@ class UnifiedSearchRemoteOperationIT : AbstractIT() { assertTrue(data.entries.isNotEmpty()) assertNotNull(data.entries.find { it.title == "test Folder" }) } + + companion object { + @BeforeClass + @JvmStatic + fun before() { + testOnlyOnServer(OwnCloudVersion.nextcloud_20) + } + } } diff --git a/library/src/androidTest/java/com/nextcloud/android/lib/richWorkspace/RichWorkspaceDirectEditingRemoteOperationIT.java b/library/src/androidTest/java/com/nextcloud/android/lib/richWorkspace/RichWorkspaceDirectEditingRemoteOperationIT.java index 8d4d2f8c3..eef06c8b5 100644 --- a/library/src/androidTest/java/com/nextcloud/android/lib/richWorkspace/RichWorkspaceDirectEditingRemoteOperationIT.java +++ b/library/src/androidTest/java/com/nextcloud/android/lib/richWorkspace/RichWorkspaceDirectEditingRemoteOperationIT.java @@ -16,13 +16,19 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation; import com.owncloud.android.lib.resources.files.UploadFileRemoteOperation; +import com.owncloud.android.lib.resources.status.OwnCloudVersion; +import org.junit.BeforeClass; import org.junit.Test; import java.io.File; import java.io.IOException; public class RichWorkspaceDirectEditingRemoteOperationIT extends AbstractIT { + @BeforeClass + public static void beforeClass() { + testOnlyOnServer(OwnCloudVersion.nextcloud_18); + } @Test public void getEditLinkForRoot() { diff --git a/library/src/androidTest/java/com/owncloud/android/AbstractIT.java b/library/src/androidTest/java/com/owncloud/android/AbstractIT.java index 629747cce..9422e2f81 100644 --- a/library/src/androidTest/java/com/owncloud/android/AbstractIT.java +++ b/library/src/androidTest/java/com/owncloud/android/AbstractIT.java @@ -314,7 +314,7 @@ protected void longSleep() { } } - protected void testOnlyOnServer(OwnCloudVersion version) { + static protected void testOnlyOnServer(OwnCloudVersion version) { OCCapability ocCapability = (OCCapability) new GetCapabilitiesRemoteOperation() .execute(nextcloudClient) .getSingleData(); diff --git a/library/src/androidTest/java/com/owncloud/android/FileIT.java b/library/src/androidTest/java/com/owncloud/android/FileIT.java index 2cadacc7c..0caa49fc6 100644 --- a/library/src/androidTest/java/com/owncloud/android/FileIT.java +++ b/library/src/androidTest/java/com/owncloud/android/FileIT.java @@ -25,6 +25,7 @@ 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 com.owncloud.android.lib.resources.status.OwnCloudVersion; import org.junit.Test; @@ -146,6 +147,8 @@ public void testShareViaLinkSharees() { @Test public void testShareToGroupSharees() { + testOnlyOnServer(OwnCloudVersion.nextcloud_17); + // create & verify folder String path = "/testFolder/"; assertTrue(new CreateFolderRemoteOperation(path, true).execute(client).isSuccess()); @@ -188,6 +191,8 @@ public void testShareToGroupSharees() { @Test public void testOneSharees() { + testOnlyOnServer(OwnCloudVersion.nextcloud_17); + // create & verify folder String path = "/testFolder/"; assertTrue(new CreateFolderRemoteOperation(path, true).execute(client).isSuccess()); @@ -223,6 +228,8 @@ public void testOneSharees() { @Test public void testTwoShareesOnParent() { + testOnlyOnServer(OwnCloudVersion.nextcloud_17); + // create & verify folder String path = "/testFolder/"; assertTrue(new CreateFolderRemoteOperation(path, true).execute(client).isSuccess()); @@ -271,6 +278,8 @@ public void testTwoShareesOnParent() { @Test public void testTwoSharees() { + testOnlyOnServer(OwnCloudVersion.nextcloud_17); + // create & verify folder String path = "/testFolder/"; assertTrue(new CreateFolderRemoteOperation(path, true).execute(client).isSuccess()); diff --git a/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java b/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java index 5445234be..97533bc45 100644 --- a/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java +++ b/library/src/androidTest/java/com/owncloud/android/GetCapabilitiesRemoteOperationIT.java @@ -9,6 +9,13 @@ */ package com.owncloud.android; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; + import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.resources.status.CapabilityBooleanType; import com.owncloud.android.lib.resources.status.E2EVersion; @@ -19,13 +26,6 @@ import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - /** * Class to test GetRemoteCapabilitiesOperation */ @@ -112,10 +112,12 @@ private void checkCapability(OCCapability capability, String userId) { assertTrue(capability.getFilesVersioning().isTrue()); assertTrue(capability.getFilesUndelete().isTrue()); assertNotNull(capability.getVersion()); - assertFalse(capability.getEtag().isEmpty()); - assertSame(CapabilityBooleanType.FALSE, capability.getRichDocuments()); - assertFalse(capability.getDirectEditingEtag().isEmpty()); assertSame(CapabilityBooleanType.UNKNOWN, capability.getDropAccount()); + if (capability.getVersion().isNewerOrEqual(OwnCloudVersion.nextcloud_17)) { + assertFalse(capability.getEtag().isEmpty()); + assertFalse(capability.getDirectEditingEtag().isEmpty()); + } + assertSame(CapabilityBooleanType.FALSE, capability.getRichDocuments()); // user status if (capability.getVersion().isNewerOrEqual(OwnCloudVersion.nextcloud_20)) { diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/e2ee/UpdateMetadataRemoteOperationIT.java b/library/src/androidTest/java/com/owncloud/android/lib/resources/e2ee/UpdateMetadataRemoteOperationIT.java index c30d7c13e..255bffb8b 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/e2ee/UpdateMetadataRemoteOperationIT.java +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/e2ee/UpdateMetadataRemoteOperationIT.java @@ -26,7 +26,7 @@ public class UpdateMetadataRemoteOperationIT extends AbstractIT { //@Test public void uploadAndModifyV1() { // tests only for NC19+ - testOnlyOnServer(OwnCloudVersion.nextcloud_20); + testOnlyOnServer(OwnCloudVersion.nextcloud_19); // E2E server app checks for official NC client with >=3.13.0, // and blocks all other clients, e.g. 3rd party apps using this lib 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 026b4083e..f222981b3 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 @@ -97,6 +97,8 @@ class ReadFileRemoteOperationIT : AbstractIT() { @Test fun testMetadata() { + testOnlyOnServer(NextcloudVersion.nextcloud_27) + val filePath = getFile("gps.jpg").absolutePath val remotePath = "/gps.jpg" @@ -113,8 +115,6 @@ class ReadFileRemoteOperationIT : AbstractIT() { @Suppress("Detekt.MagicNumber") assertEquals(ImageDimension(451f, 529f), remoteFile.imageDimension) - testOnlyOnServer(NextcloudVersion.nextcloud_27) - val ocCapability = GetCapabilitiesRemoteOperation() .execute(nextcloudClient) 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 f16c50e8d..71e77449c 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,7 +24,9 @@ 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 com.owncloud.android.lib.resources.status.OwnCloudVersion; import org.junit.BeforeClass; import org.junit.Test; @@ -94,6 +96,12 @@ public void testFileSearchEmpty() throws IOException { @Test public void testFileSearchEverything() throws IOException { + // on newer server we have Talk folder + int offset = 0; + if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) { + offset = 1; + } + for (int i = 0; i < 10; i++) { String filePath = createFile("image" + i); String remotePath = "/image" + i + ".jpg"; @@ -108,7 +116,7 @@ public void testFileSearchEverything() throws IOException { RemoteOperationResult> result = sut.execute(client); assertTrue(result.isSuccess()); - assertEquals(11, result.getResultData().size()); + assertEquals(offset + 10, result.getResultData().size()); } @Test @@ -202,7 +210,14 @@ public void favoriteFiles() throws IOException { assertEquals(2, result.getResultData().size()); assertEquals(remotePath, result.getResultData().get(0).getRemotePath()); - assertEquals(sharedRemotePath, result.getResultData().get(1).getRemotePath()); + + if (capability.getVersion().isNewerOrEqual(OwnCloudVersion.nextcloud_17)) { + assertEquals(sharedRemotePath, result.getResultData().get(1).getRemotePath()); + } else { + // on NC16 we have a bug that each file ends with "/" + sharedRemotePath += "/"; + assertEquals(sharedRemotePath, result.getResultData().get(1).getRemotePath()); + } } /** @@ -210,6 +225,12 @@ public void favoriteFiles() throws IOException { */ @Test public void testRecentlyModifiedSearch() throws IOException { + // on newer server we have Talk folder + int offset = 0; + if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) { + offset = 1; + } + long now = System.currentTimeMillis() / MILLI_TO_SECOND; String filePath = createFile("image"); assertTrue(new UploadFileRemoteOperation(filePath, "/image.jpg", "image/jpg", now - 50) @@ -234,7 +255,7 @@ public void testRecentlyModifiedSearch() throws IOException { RemoteOperationResult> result = sut.execute(client); assertTrue(result.isSuccess()); - assertEquals(4, result.getResultData().size()); + assertEquals(offset + 3, result.getResultData().size()); assertEquals("/video.mp4", result.getResultData().get(0).getRemotePath()); assertEquals("/pdf.pdf", result.getResultData().get(1).getRemotePath()); @@ -399,6 +420,8 @@ public void testPhotoSearchLimitAndTimestamp() throws IOException { @Test public void testGallerySearch() throws IOException { + testOnlyOnServer(OwnCloudVersion.nextcloud_18); + for (int i = 0; i < 10; i++) { String filePath = createFile("image" + i); String remotePath = "/image" + i + ".jpg"; @@ -425,6 +448,12 @@ public void testGallerySearch() throws IOException { @Test public void showOnlyFolders() throws IOException { + // on newer server we have Talk folder + int offset = 0; + if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) { + offset = 1; + } + for (int i = 0; i < 10; i++) { String filePath = createFile("image" + i); String remotePath = "/image" + i + ".jpg"; @@ -438,13 +467,13 @@ public void showOnlyFolders() throws IOException { RemoteOperationResult> result = sut.execute(client); assertTrue(result.isSuccess()); - assertEquals(1, result.getResultData().size()); + assertEquals(0 + offset, result.getResultData().size()); assertTrue(new CreateFolderRemoteOperation("/folder/", false).execute(client).isSuccess()); result = sut.execute(client); assertTrue(result.isSuccess()); - assertEquals(2, result.getResultData().size()); + assertEquals(1 + offset, result.getResultData().size()); assertEquals("/folder/", result.getResultData().get(0).getRemotePath()); } diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/files/UploadFileRemoteOperationIT.kt b/library/src/androidTest/java/com/owncloud/android/lib/resources/files/UploadFileRemoteOperationIT.kt index 8376af46c..f803ab8b0 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/files/UploadFileRemoteOperationIT.kt +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/files/UploadFileRemoteOperationIT.kt @@ -11,6 +11,9 @@ import android.os.Build import com.owncloud.android.AbstractIT import com.owncloud.android.lib.common.utils.Log_OC import com.owncloud.android.lib.resources.files.model.RemoteFile +import com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation +import com.owncloud.android.lib.resources.status.OCCapability +import com.owncloud.android.lib.resources.status.OwnCloudVersion import junit.framework.TestCase.assertEquals import org.junit.Assert.assertNotNull import org.junit.Assert.assertTrue @@ -32,6 +35,10 @@ class UploadFileRemoteOperationIT : AbstractIT() { @Test fun upload() { + val ocCapability = + GetCapabilitiesRemoteOperation() + .execute(nextcloudClient).singleData as OCCapability + // create file val filePath = createFile("text") val remotePath = "/test.md" @@ -59,12 +66,15 @@ class UploadFileRemoteOperationIT : AbstractIT() { var remoteFile = result.data[0] as RemoteFile assertEquals(remotePath, remoteFile.remotePath) - assertEquals(creationTimestamp, remoteFile.creationTimestamp) assertEquals(uploadResult.resultData, remoteFile.etag) - assertTrue( - uploadTimestamp - TIME_OFFSET < remoteFile.uploadTimestamp || - uploadTimestamp + TIME_OFFSET > remoteFile.uploadTimestamp - ) + + if (ocCapability.version.isNewerOrEqual(OwnCloudVersion.nextcloud_18)) { + assertEquals(creationTimestamp, remoteFile.creationTimestamp) + assertTrue( + uploadTimestamp - TIME_OFFSET < remoteFile.uploadTimestamp || + uploadTimestamp + TIME_OFFSET > remoteFile.uploadTimestamp + ) + } // ReadFolderRemoteOperation result = ReadFolderRemoteOperation(remotePath).execute(client) @@ -73,11 +83,14 @@ class UploadFileRemoteOperationIT : AbstractIT() { remoteFile = result.data[0] as RemoteFile assertEquals(remotePath, remoteFile.remotePath) - assertEquals(creationTimestamp, remoteFile.creationTimestamp) - assertTrue( - uploadTimestamp - TIME_OFFSET < remoteFile.uploadTimestamp || - uploadTimestamp + TIME_OFFSET > remoteFile.uploadTimestamp - ) + + if (ocCapability.version.isNewerOrEqual(OwnCloudVersion.nextcloud_18)) { + assertEquals(creationTimestamp, remoteFile.creationTimestamp) + assertTrue( + uploadTimestamp - TIME_OFFSET < remoteFile.uploadTimestamp || + uploadTimestamp + TIME_OFFSET > remoteFile.uploadTimestamp + ) + } } private fun getCreationTimestamp(file: File): Long? { diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/shares/GetSharesRemoteOperationIT.java b/library/src/androidTest/java/com/owncloud/android/lib/resources/shares/GetSharesRemoteOperationIT.java index 58ed2ac25..27d2f0cb3 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/shares/GetSharesRemoteOperationIT.java +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/shares/GetSharesRemoteOperationIT.java @@ -27,6 +27,7 @@ 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 com.owncloud.android.lib.resources.status.OwnCloudVersion; import junit.framework.TestCase; @@ -154,6 +155,8 @@ private void assertFolderAttributes(final OCShare share, final String expectedDi @Test public void sharedWithMe() { + testOnlyOnServer(OwnCloudVersion.nextcloud_19); + GetSharesRemoteOperation sut = new GetSharesRemoteOperation(); GetSharesRemoteOperation sutSharedWithMe = new GetSharesRemoteOperation(true); diff --git a/library/src/androidTest/java/com/owncloud/android/lib/resources/users/AppTokenRemoteOperationIT.kt b/library/src/androidTest/java/com/owncloud/android/lib/resources/users/AppTokenRemoteOperationIT.kt index 53802ec18..3642fbf05 100644 --- a/library/src/androidTest/java/com/owncloud/android/lib/resources/users/AppTokenRemoteOperationIT.kt +++ b/library/src/androidTest/java/com/owncloud/android/lib/resources/users/AppTokenRemoteOperationIT.kt @@ -9,6 +9,7 @@ package com.owncloud.android.lib.resources.users import androidx.test.platform.app.InstrumentationRegistry import com.owncloud.android.AbstractIT +import com.owncloud.android.lib.resources.status.OwnCloudVersion import junit.framework.Assert.assertFalse import junit.framework.Assert.assertTrue import okhttp3.Credentials.basic @@ -57,6 +58,8 @@ class AppTokenRemoteOperationIT : AbstractIT() { @Test fun deleteAppPassword() { + testOnlyOnServer(OwnCloudVersion.nextcloud_17) + val arguments = InstrumentationRegistry.getArguments() val username: String = arguments.getString("TEST_SERVER_USERNAME", "") val password: String = arguments.getString("TEST_SERVER_PASSWORD", "")