Skip to content

Commit 2399806

Browse files
wip
Signed-off-by: tobiasKaminsky <[email protected]>
1 parent 4d3fd98 commit 2399806

File tree

6 files changed

+31
-17
lines changed

6 files changed

+31
-17
lines changed

.github/workflows/configNC_master.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,40 @@ php /var/www/html/occ group:adduser users user1
2424
php /var/www/html/occ group:adduser users user2
2525
php /var/www/html/occ group:adduser users test
2626

27-
git clone -b master https://github.com/nextcloud/activity.git /var/www/html/apps/activity/
27+
git clone --depth=1 -b master https://github.com/nextcloud/activity.git /var/www/html/apps/activity/
2828
php /var/www/html/occ app:enable activity
2929

30-
git clone -b main https://github.com/nextcloud/text.git /var/www/html/apps/text/
30+
git clone --depth=1 -b main https://github.com/nextcloud/text.git /var/www/html/apps/text/
3131
php /var/www/html/occ app:enable text
3232

33-
git clone -b master https://github.com/nextcloud/end_to_end_encryption/ /var/www/html/apps/end_to_end_encryption/
33+
git clone --depth=1 -b master https://github.com/nextcloud/end_to_end_encryption/ /var/www/html/apps/end_to_end_encryption/
3434
php /var/www/html/occ app:enable end_to_end_encryption
3535

36-
git clone -b master https://github.com/nextcloud/password_policy/ /var/www/html/apps/password_policy/
36+
git clone --depth=1 -b master https://github.com/nextcloud/password_policy/ /var/www/html/apps/password_policy/
3737
php /var/www/html/occ app:enable password_policy
3838

39-
git clone -b master https://github.com/nextcloud/external/ /var/www/html/apps/external/
39+
git clone --depth=1 -b master https://github.com/nextcloud/external/ /var/www/html/apps/external/
4040
cd /var/www/html/apps/external; composer install --no-dev
4141
php /var/www/html/occ app:enable external
4242
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}}"
4343

44-
git clone -b main https://github.com/nextcloud/files_lock.git /var/www/html/apps/files_lock/
44+
git clone --depth=1 -b main https://github.com/nextcloud/files_lock.git /var/www/html/apps/files_lock/
4545
php /var/www/html/occ app:enable -f files_lock
4646

47-
git clone https://github.com/nextcloud/groupfolders.git /var/www/html/apps/groupfolders/
47+
git clone --depth=1 https://github.com/nextcloud/groupfolders.git /var/www/html/apps/groupfolders/
4848
php /var/www/html/occ app:enable -f groupfolders
4949
php /var/www/html/occ groupfolders:create groupfolder
5050
php /var/www/html/occ groupfolders:group 1 users
5151

52-
git clone https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/
52+
git clone --depth=1 https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/
5353
php /var/www/html/occ app:enable -f notifications
5454
php /var/www/html/occ notification:generate test -d test
5555

56-
git clone https://github.com/nextcloud/photos.git /var/www/html/apps/photos/
56+
git clone --depth=1 https://github.com/nextcloud/photos.git /var/www/html/apps/photos/
5757
cd /var/www/html/apps/photos; composer install --no-dev
5858
php /var/www/html/occ app:enable -f photos
5959

60-
git clone https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/
60+
git clone --depth=1 https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/
6161
cd /var/www/html/apps/assistant; source ~/.bashrc; make
6262
php /var/www/html/occ app:enable -f assistant
6363

.github/workflows/configNC_stable16.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ php /var/www/html/occ group:adduser users user1
2121
php /var/www/html/occ group:adduser users user2
2222
php /var/www/html/occ group:adduser users test
2323

24+
git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/activity.git /var/www/html/apps/activity/
2425
php /var/www/html/occ app:enable activity
2526

27+
git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/text.git /var/www/html/apps/text/
2628
php /var/www/html/occ app:enable text
2729

2830
php /var/www/html/occ app:enable end_to_end_encryption
2931

32+
git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/password_policy/ /var/www/html/apps/password_policy/
3033
php /var/www/html/occ app:enable password_policy
3134

3235
php /var/www/html/occ app:enable external
@@ -36,7 +39,7 @@ php /var/www/html/occ app:enable groupfolders
3639
php /var/www/html/occ groupfolders:create groupfolder
3740
php /var/www/html/occ groupfolders:group 1 users
3841

39-
git clone -b $SERVER_VERSION https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/
42+
git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/
4043
php /var/www/html/occ app:enable notifications
4144

4245
php /var/www/html/occ app:enable testing

library/src/androidTest/java/com/nextcloud/android/lib/resources/dashboard/DashboardGetWidgetItemsRemoteOperationIT.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ import com.owncloud.android.lib.resources.shares.OCShare
1414
import com.owncloud.android.lib.resources.shares.ShareType
1515
import com.owncloud.android.lib.resources.status.NextcloudVersion
1616
import org.junit.Assert.assertTrue
17+
import org.junit.Before
1718
import org.junit.Test
1819

1920
class DashboardGetWidgetItemsRemoteOperationIT : AbstractIT() {
20-
@Test
21-
fun getItems() {
21+
@Before
22+
fun before() {
2223
// only on NC25+
2324
testOnlyOnServer(NextcloudVersion.nextcloud_25)
25+
}
2426

27+
@Test
28+
fun getItems() {
2529
// create folder to have some content
2630
assertTrue(CreateFolderRemoteOperation("/testFolder", false).execute(client2).isSuccess)
2731
assertTrue(

library/src/androidTest/java/com/owncloud/android/lib/resources/files/SearchRemoteOperationIT.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public void testFileSearchEmpty() throws IOException {
9898
public void testFileSearchEverything() throws IOException {
9999
// on newer server we have Talk folder
100100
int offset = 0;
101-
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) {
101+
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20) ||
102+
capability.getVersion().getMajorVersionNumber() == NextcloudVersion.nextcloud_16.getMajorVersionNumber()) {
102103
offset = 1;
103104
}
104105

@@ -227,7 +228,8 @@ public void favoriteFiles() throws IOException {
227228
public void testRecentlyModifiedSearch() throws IOException {
228229
// on newer server we have Talk folder
229230
int offset = 0;
230-
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) {
231+
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20) ||
232+
capability.getVersion().getMajorVersionNumber() == NextcloudVersion.nextcloud_16.getMajorVersionNumber()) {
231233
offset = 1;
232234
}
233235

@@ -449,8 +451,10 @@ public void testGallerySearch() throws IOException {
449451
@Test
450452
public void showOnlyFolders() throws IOException {
451453
// on newer server we have Talk folder
454+
// on NC16 groupfolder is also returned
452455
int offset = 0;
453-
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) {
456+
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20) ||
457+
capability.getVersion().getMajorVersionNumber() == NextcloudVersion.nextcloud_16.getMajorVersionNumber()) {
454458
offset = 1;
455459
}
456460

library/src/androidTest/java/com/owncloud/android/lib/resources/notifications/NotificationIT.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
package com.owncloud.android.lib.resources.notifications
99

1010
import com.owncloud.android.AbstractIT
11+
import com.owncloud.android.lib.resources.status.OwnCloudVersion
1112
import junit.framework.TestCase.assertEquals
1213
import junit.framework.TestCase.assertTrue
1314
import org.junit.Test
@@ -20,6 +21,8 @@ class NotificationIT : AbstractIT() {
2021
assertTrue(all.isSuccess)
2122

2223
// get one
24+
testOnlyOnServer(OwnCloudVersion.nextcloud_17)
25+
2326
val firstNotification = all.resultData[0]
2427
val first =
2528
GetNotificationRemoteOperation(firstNotification.notificationId).execute(

scripts/uploadReport.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fi
3939
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) \;
4040
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) --upload-file {} \;
4141
42-
echo "Uploaded failing library tests to https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER"
42+
echo "Uploaded failing library tests to https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER/debug/"
4343
4444
curl -u $GIT_USERNAME:$GIT_TOKEN -X POST https://api.github.com/repos/nextcloud/android-library/issues/$PR_ID/comments -d "{ \"body\" : \"$BRANCH_TYPE test failed: https://www.kaminsky.me/nc-dev/library-integrationTests/$REMOTE_FOLDER/debug/ \" }"
4545
exit 1

0 commit comments

Comments
 (0)