Loading .travis.yml +14 −14 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ android: branches: only: - master before_install: - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M Loading @@ -25,21 +24,22 @@ script: - ./gradlew clean build env: global: - secure: a21NrzTCQnkTKtRGo7B1lyF2WWbpBT2N64V2Tf+oUcRLOUx3XM/mDi60mAdGd0WXV9tHD8GGmu0tQ7LGZ2VsIxixVxjzEYwX4HRTodewYez6WxBMjVEHHy+3jmc1zU4k3AAqr+uW7L4BKa5r9tH+nq9ecJMDMgW8o9MKXuP7Vso= - secure: UVnaC5Qzat2C8WlMMb8aycz1ChZKjP8Kz89qBbVcqYK+PLAGKpUNxFa39/2oA5jkMyyOcXYC9bX1ZYzHLH7nJ8LbQgaxXMT4gvgvN0l6KezjDavIW60idD9BbugkwzNj/cjoU/DdxBykPsTn4vSRaESVNTdEbM27YU4FBPzTANY= - secure: XEQY8s7p65lWWOuKbVDdTh6ZJtRTJ74Zw3H/+2Ms6vjZhFZsdUJjGo66LW6YvlhmYDXgiPB9piYQGcrGgT3hXJwXoge6n1pdixnV250J0T0dIZMbXYTWTARxDsyq48+LgUuF3pgqvqDWhBcemrePWv48q7fs/mwzuFSOyc8QwLk= # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - secure: "epTZ0zZGDbHL3o6vSC9uNkZsi5j5SA6O/tvQBH7QW/dluuzIJxIjfhNbZHDyBReYDleirLzUFQpdWAUdvulCMLs/qZdIzFGlYXZSpxEnvPYMGQcilwADdJcxLw8L+3+ET5hSexxhjrTGw427IljkqGUpqQTxaLwFdFu98lDWSbc=" - secure: epTZ0zZGDbHL3o6vSC9uNkZsi5j5SA6O/tvQBH7QW/dluuzIJxIjfhNbZHDyBReYDleirLzUFQpdWAUdvulCMLs/qZdIzFGlYXZSpxEnvPYMGQcilwADdJcxLw8L+3+ET5hSexxhjrTGw427IljkqGUpqQTxaLwFdFu98lDWSbc= # The next 3 declarations are the variables needed to access the test server, # added via "travis encrypt", using the repo public key - secure: gPCBnpGLA2sdSMtfhT+/InThmXNEU8XrrS54uuIP8iXBLvVe0yZrNl76GbMosV0ry3YtDngsmsbHwRjPPb0+3mTTdAqZ60HHzGaNPgEm6b5t0t4bpJ3LW9osLZsuf9jRsI2LD66zxblaMrK2+8hN/dUrj707ijsZHp3SPSQJ6g8= - secure: AnxLVarfwM7IhJ7Sca35USyRlFHFvlcBhWTt2TVDcyQ+ldDyb+U6IWXFK0Yy82QP0ZH/RCLu7FnmHK/rKG0BHNRt1Ymco1VkTQql0MZcHXP+4IKgEvgJyUn1TqYj+hSVmM6lgTA+QUjZYGSfwU8mhUFiU7644ZTdTe6ALdqa+v8= - secure: ezKyZbb3q1Phcv/vJntuJe0C2req+Hp4/C+tFZIWZ3o8wRO9jVI3bnED9TWQyQOOT0SoRYjJ5zqp0UcEOGCzPeWFO6bA7RWp+zA/R9sziLNcVWMVv3WXnuClQjPBHJeXRnP7YmNjxDmSfV97a14dk5d9LgJZYliTDepH4dLsxro= matrix: - ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a addons: coverity_scan: project: name: "owncloud/android-library" description: "Build submitted via Travis CI" name: owncloud/android-library description: Build submitted via Travis CI notification_email: lukas@owncloud.com build_command_prepend: "gradle clean" build_command: "gradle build" branch_pattern: "coverity_scan" build_command_prepend: gradle clean build_command: gradle build branch_pattern: coverity_scan test_client/tests/src/com/owncloud/android/lib/test_project/test/GetShareesTest.java +8 −8 Original line number Diff line number Diff line Loading @@ -127,9 +127,9 @@ public class GetShareesTest extends RemoteTest { JSONObject value; byte type; int userCount = 0, groupCount = 0; assertTrue(result.isSuccess() && result.getData().size() == 3); assertTrue(result.isSuccess() && result.getData().size() > 0); try { for (int i=0; i<3; i++) { for (int i=0; i<result.getData().size(); i++) { resultItem = (JSONObject) result.getData().get(i); value = resultItem.getJSONObject(GetRemoteShareesOperation.NODE_VALUE); type = (byte) value.getInt(GetRemoteShareesOperation.PROPERTY_SHARE_TYPE); Loading @@ -139,15 +139,15 @@ public class GetShareesTest extends RemoteTest { userCount++; } } assertEquals(userCount, 2); assertEquals(groupCount, 1); assertTrue(userCount > 0); assertTrue(groupCount > 0); } catch (JSONException e) { AssertionFailedError afe = new AssertionFailedError(e.getLocalizedMessage()); afe.setStackTrace(e.getStackTrace()); throw afe; } // search for sharees including "ad" // search for sharees including "ad" - expecting user "admin" & group "admin" getShareesOperation = new GetRemoteShareesOperation("ad", 1, 50); result = getShareesOperation.execute(mClient); assertTrue(result.isSuccess() && result.getData().size() == 2); Loading @@ -172,8 +172,8 @@ public class GetShareesTest extends RemoteTest { } // search for sharees including "b" getShareesOperation = new GetRemoteShareesOperation("b", 1, 50); // search for sharees including "bd" - expecting 0 results getShareesOperation = new GetRemoteShareesOperation("bd", 1, 50); result = getShareesOperation.execute(mClient); assertTrue(result.isSuccess() && result.getData().size() == 0); Loading test_client/tests/src/com/owncloud/android/lib/test_project/test/UpdatePrivateShareTest.java +11 −4 Original line number Diff line number Diff line Loading @@ -174,7 +174,9 @@ public class UpdatePrivateShareTest extends RemoteTest { if (mFileShare != null) { /// successful tests // Update Share permissions on a shared file UpdateRemoteShareOperation updateShare = new UpdateRemoteShareOperation(mFileShare.getRemoteId()); UpdateRemoteShareOperation updateShare = new UpdateRemoteShareOperation( mFileShare.getRemoteId() ); updateShare.setPermissions(OCShare.READ_PERMISSION_FLAG); // minimum permissions RemoteOperationResult result = updateShare.execute(mClient); assertTrue(result.isSuccess()); Loading @@ -189,17 +191,22 @@ public class UpdatePrivateShareTest extends RemoteTest { /// unsuccessful tests // Update Share with invalid permissions updateShare = new UpdateRemoteShareOperation(mFileShare.getRemoteId()); updateShare.setPermissions(OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER + 1); // greater than maximum value // greater than maximum value updateShare.setPermissions(OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER + 1); result = updateShare.execute(mClient); assertFalse(result.isSuccess()); // Unshare the file before next unsuccessful tests RemoveRemoteShareOperation unshare = new RemoveRemoteShareOperation((int) mFileShare.getRemoteId()); RemoveRemoteShareOperation unshare = new RemoveRemoteShareOperation( (int) mFileShare.getRemoteId() ); result = unshare.execute(mClient); if (result.isSuccess()) { // Update Share permissions on unknown share UpdateRemoteShareOperation updateNoShare = new UpdateRemoteShareOperation(mFileShare.getRemoteId()); UpdateRemoteShareOperation updateNoShare = new UpdateRemoteShareOperation( mFileShare.getRemoteId() ); updateShare.setPermissions(OCShare.READ_PERMISSION_FLAG); // minimum permissions result = updateShare.execute(mClient); assertFalse(result.isSuccess()); Loading src/com/owncloud/android/lib/resources/shares/GetRemoteSharesForFileOperation.java +5 −5 File changed.Contains only whitespace changes. Show changes Loading
.travis.yml +14 −14 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ android: branches: only: - master before_install: - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M Loading @@ -25,21 +24,22 @@ script: - ./gradlew clean build env: global: - secure: a21NrzTCQnkTKtRGo7B1lyF2WWbpBT2N64V2Tf+oUcRLOUx3XM/mDi60mAdGd0WXV9tHD8GGmu0tQ7LGZ2VsIxixVxjzEYwX4HRTodewYez6WxBMjVEHHy+3jmc1zU4k3AAqr+uW7L4BKa5r9tH+nq9ecJMDMgW8o9MKXuP7Vso= - secure: UVnaC5Qzat2C8WlMMb8aycz1ChZKjP8Kz89qBbVcqYK+PLAGKpUNxFa39/2oA5jkMyyOcXYC9bX1ZYzHLH7nJ8LbQgaxXMT4gvgvN0l6KezjDavIW60idD9BbugkwzNj/cjoU/DdxBykPsTn4vSRaESVNTdEbM27YU4FBPzTANY= - secure: XEQY8s7p65lWWOuKbVDdTh6ZJtRTJ74Zw3H/+2Ms6vjZhFZsdUJjGo66LW6YvlhmYDXgiPB9piYQGcrGgT3hXJwXoge6n1pdixnV250J0T0dIZMbXYTWTARxDsyq48+LgUuF3pgqvqDWhBcemrePWv48q7fs/mwzuFSOyc8QwLk= # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - secure: "epTZ0zZGDbHL3o6vSC9uNkZsi5j5SA6O/tvQBH7QW/dluuzIJxIjfhNbZHDyBReYDleirLzUFQpdWAUdvulCMLs/qZdIzFGlYXZSpxEnvPYMGQcilwADdJcxLw8L+3+ET5hSexxhjrTGw427IljkqGUpqQTxaLwFdFu98lDWSbc=" - secure: epTZ0zZGDbHL3o6vSC9uNkZsi5j5SA6O/tvQBH7QW/dluuzIJxIjfhNbZHDyBReYDleirLzUFQpdWAUdvulCMLs/qZdIzFGlYXZSpxEnvPYMGQcilwADdJcxLw8L+3+ET5hSexxhjrTGw427IljkqGUpqQTxaLwFdFu98lDWSbc= # The next 3 declarations are the variables needed to access the test server, # added via "travis encrypt", using the repo public key - secure: gPCBnpGLA2sdSMtfhT+/InThmXNEU8XrrS54uuIP8iXBLvVe0yZrNl76GbMosV0ry3YtDngsmsbHwRjPPb0+3mTTdAqZ60HHzGaNPgEm6b5t0t4bpJ3LW9osLZsuf9jRsI2LD66zxblaMrK2+8hN/dUrj707ijsZHp3SPSQJ6g8= - secure: AnxLVarfwM7IhJ7Sca35USyRlFHFvlcBhWTt2TVDcyQ+ldDyb+U6IWXFK0Yy82QP0ZH/RCLu7FnmHK/rKG0BHNRt1Ymco1VkTQql0MZcHXP+4IKgEvgJyUn1TqYj+hSVmM6lgTA+QUjZYGSfwU8mhUFiU7644ZTdTe6ALdqa+v8= - secure: ezKyZbb3q1Phcv/vJntuJe0C2req+Hp4/C+tFZIWZ3o8wRO9jVI3bnED9TWQyQOOT0SoRYjJ5zqp0UcEOGCzPeWFO6bA7RWp+zA/R9sziLNcVWMVv3WXnuClQjPBHJeXRnP7YmNjxDmSfV97a14dk5d9LgJZYliTDepH4dLsxro= matrix: - ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a addons: coverity_scan: project: name: "owncloud/android-library" description: "Build submitted via Travis CI" name: owncloud/android-library description: Build submitted via Travis CI notification_email: lukas@owncloud.com build_command_prepend: "gradle clean" build_command: "gradle build" branch_pattern: "coverity_scan" build_command_prepend: gradle clean build_command: gradle build branch_pattern: coverity_scan
test_client/tests/src/com/owncloud/android/lib/test_project/test/GetShareesTest.java +8 −8 Original line number Diff line number Diff line Loading @@ -127,9 +127,9 @@ public class GetShareesTest extends RemoteTest { JSONObject value; byte type; int userCount = 0, groupCount = 0; assertTrue(result.isSuccess() && result.getData().size() == 3); assertTrue(result.isSuccess() && result.getData().size() > 0); try { for (int i=0; i<3; i++) { for (int i=0; i<result.getData().size(); i++) { resultItem = (JSONObject) result.getData().get(i); value = resultItem.getJSONObject(GetRemoteShareesOperation.NODE_VALUE); type = (byte) value.getInt(GetRemoteShareesOperation.PROPERTY_SHARE_TYPE); Loading @@ -139,15 +139,15 @@ public class GetShareesTest extends RemoteTest { userCount++; } } assertEquals(userCount, 2); assertEquals(groupCount, 1); assertTrue(userCount > 0); assertTrue(groupCount > 0); } catch (JSONException e) { AssertionFailedError afe = new AssertionFailedError(e.getLocalizedMessage()); afe.setStackTrace(e.getStackTrace()); throw afe; } // search for sharees including "ad" // search for sharees including "ad" - expecting user "admin" & group "admin" getShareesOperation = new GetRemoteShareesOperation("ad", 1, 50); result = getShareesOperation.execute(mClient); assertTrue(result.isSuccess() && result.getData().size() == 2); Loading @@ -172,8 +172,8 @@ public class GetShareesTest extends RemoteTest { } // search for sharees including "b" getShareesOperation = new GetRemoteShareesOperation("b", 1, 50); // search for sharees including "bd" - expecting 0 results getShareesOperation = new GetRemoteShareesOperation("bd", 1, 50); result = getShareesOperation.execute(mClient); assertTrue(result.isSuccess() && result.getData().size() == 0); Loading
test_client/tests/src/com/owncloud/android/lib/test_project/test/UpdatePrivateShareTest.java +11 −4 Original line number Diff line number Diff line Loading @@ -174,7 +174,9 @@ public class UpdatePrivateShareTest extends RemoteTest { if (mFileShare != null) { /// successful tests // Update Share permissions on a shared file UpdateRemoteShareOperation updateShare = new UpdateRemoteShareOperation(mFileShare.getRemoteId()); UpdateRemoteShareOperation updateShare = new UpdateRemoteShareOperation( mFileShare.getRemoteId() ); updateShare.setPermissions(OCShare.READ_PERMISSION_FLAG); // minimum permissions RemoteOperationResult result = updateShare.execute(mClient); assertTrue(result.isSuccess()); Loading @@ -189,17 +191,22 @@ public class UpdatePrivateShareTest extends RemoteTest { /// unsuccessful tests // Update Share with invalid permissions updateShare = new UpdateRemoteShareOperation(mFileShare.getRemoteId()); updateShare.setPermissions(OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER + 1); // greater than maximum value // greater than maximum value updateShare.setPermissions(OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER + 1); result = updateShare.execute(mClient); assertFalse(result.isSuccess()); // Unshare the file before next unsuccessful tests RemoveRemoteShareOperation unshare = new RemoveRemoteShareOperation((int) mFileShare.getRemoteId()); RemoveRemoteShareOperation unshare = new RemoveRemoteShareOperation( (int) mFileShare.getRemoteId() ); result = unshare.execute(mClient); if (result.isSuccess()) { // Update Share permissions on unknown share UpdateRemoteShareOperation updateNoShare = new UpdateRemoteShareOperation(mFileShare.getRemoteId()); UpdateRemoteShareOperation updateNoShare = new UpdateRemoteShareOperation( mFileShare.getRemoteId() ); updateShare.setPermissions(OCShare.READ_PERMISSION_FLAG); // minimum permissions result = updateShare.execute(mClient); assertFalse(result.isSuccess()); Loading
src/com/owncloud/android/lib/resources/shares/GetRemoteSharesForFileOperation.java +5 −5 File changed.Contains only whitespace changes. Show changes