From fe23d006c3894d88693d6ad7d0b63ea8ab67d393 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Fri, 8 Sep 2023 15:43:55 +0200 Subject: [PATCH] Fixed test --- pkg/ocm/share/repository/nextcloud/nextcloud_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/ocm/share/repository/nextcloud/nextcloud_test.go b/pkg/ocm/share/repository/nextcloud/nextcloud_test.go index 69bc05bfac..5001ea7a99 100644 --- a/pkg/ocm/share/repository/nextcloud/nextcloud_test.go +++ b/pkg/ocm/share/repository/nextcloud/nextcloud_test.go @@ -22,6 +22,7 @@ import ( "context" "os" + appprovider "github.com/cs3org/go-cs3apis/cs3/app/provider/v1beta1" userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" ocm "github.com/cs3org/go-cs3apis/cs3/sharing/ocm/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" @@ -280,7 +281,9 @@ var _ = Describe("Nextcloud", func() { OpaqueId: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", }, AccessMethods: []*ocm.AccessMethod{ - masked_share.NewWebDavAccessMethod(conversions.RoleFromOCSPermissions(conversions.Permissions(1)).CS3ResourcePermissions()), + masked_share.NewWebDavAccessMethod(conversions.NewEditorRole().CS3ResourcePermissions()), + masked_share.NewWebappAccessMethod(appprovider.ViewMode_VIEW_MODE_READ_WRITE), + masked_share.NewTransferAccessMethod(), }, Ctime: &types.Timestamp{ Seconds: 1234567890, @@ -436,7 +439,9 @@ var _ = Describe("Nextcloud", func() { }, ShareType: ocm.ShareType_SHARE_TYPE_USER, AccessMethods: []*ocm.AccessMethod{ - masked_share.NewWebDavAccessMethod(conversions.RoleFromOCSPermissions(conversions.Permissions(1)).CS3ResourcePermissions()), + masked_share.NewWebDavAccessMethod(conversions.NewEditorRole().CS3ResourcePermissions()), + masked_share.NewWebappAccessMethod(appprovider.ViewMode_VIEW_MODE_READ_WRITE), + masked_share.NewTransferAccessMethod(), }, Token: "some-token", }))