Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
  • Loading branch information
tobiasKaminsky committed Apr 29, 2024
1 parent 4d3fd98 commit 2399806
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 17 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/configNC_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,40 @@ php /var/www/html/occ group:adduser users user1
php /var/www/html/occ group:adduser users user2
php /var/www/html/occ group:adduser users test

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

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

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

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

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

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

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

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

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

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

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/configNC_stable16.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ php /var/www/html/occ group:adduser users user1
php /var/www/html/occ group:adduser users user2
php /var/www/html/occ group:adduser users test

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

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

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

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

php /var/www/html/occ app:enable external
Expand All @@ -36,7 +39,7 @@ php /var/www/html/occ app:enable groupfolders
php /var/www/html/occ groupfolders:create groupfolder
php /var/www/html/occ groupfolders:group 1 users

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

php /var/www/html/occ app:enable testing
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ import com.owncloud.android.lib.resources.shares.OCShare
import com.owncloud.android.lib.resources.shares.ShareType
import com.owncloud.android.lib.resources.status.NextcloudVersion
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test

class DashboardGetWidgetItemsRemoteOperationIT : AbstractIT() {
@Test
fun getItems() {
@Before
fun before() {
// only on NC25+
testOnlyOnServer(NextcloudVersion.nextcloud_25)
}

@Test
fun getItems() {
// create folder to have some content
assertTrue(CreateFolderRemoteOperation("/testFolder", false).execute(client2).isSuccess)
assertTrue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public void testFileSearchEmpty() throws IOException {
public void testFileSearchEverything() throws IOException {
// on newer server we have Talk folder
int offset = 0;
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) {
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20) ||
capability.getVersion().getMajorVersionNumber() == NextcloudVersion.nextcloud_16.getMajorVersionNumber()) {
offset = 1;
}

Expand Down Expand Up @@ -227,7 +228,8 @@ public void favoriteFiles() throws IOException {
public void testRecentlyModifiedSearch() throws IOException {
// on newer server we have Talk folder
int offset = 0;
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) {
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20) ||
capability.getVersion().getMajorVersionNumber() == NextcloudVersion.nextcloud_16.getMajorVersionNumber()) {
offset = 1;
}

Expand Down Expand Up @@ -449,8 +451,10 @@ public void testGallerySearch() throws IOException {
@Test
public void showOnlyFolders() throws IOException {
// on newer server we have Talk folder
// on NC16 groupfolder is also returned
int offset = 0;
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20)) {
if (capability.getVersion().isNewerOrEqual(NextcloudVersion.nextcloud_20) ||
capability.getVersion().getMajorVersionNumber() == NextcloudVersion.nextcloud_16.getMajorVersionNumber()) {
offset = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package com.owncloud.android.lib.resources.notifications

import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.resources.status.OwnCloudVersion
import junit.framework.TestCase.assertEquals
import junit.framework.TestCase.assertTrue
import org.junit.Test
Expand All @@ -20,6 +21,8 @@ class NotificationIT : AbstractIT() {
assertTrue(all.isSuccess)

// get one
testOnlyOnServer(OwnCloudVersion.nextcloud_17)

val firstNotification = all.resultData[0]
val first =
GetNotificationRemoteOperation(firstNotification.notificationId).execute(
Expand Down
2 changes: 1 addition & 1 deletion scripts/uploadReport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi
find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) \;
find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$REMOTE_FOLDER/$(echo {} | sed s#\./##) --upload-file {} \;
echo "Uploaded failing library tests to https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER"
echo "Uploaded failing library tests to https://www.kaminsky.me/nc-dev/android-library-integrationTests/$REMOTE_FOLDER/debug/"
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/ \" }"
exit 1

0 comments on commit 2399806

Please sign in to comment.