github.com/cs3org/reva/v2@v2.27.7/pkg/storage/fs/ocis/ocis_test.go (about) 1 // Copyright 2018-2021 CERN 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 // In applying this license, CERN does not waive the privileges and immunities 16 // granted to it by virtue of its status as an Intergovernmental Organization 17 // or submit itself to any jurisdiction. 18 19 package ocis_test 20 21 import ( 22 "os" 23 24 "github.com/cs3org/reva/v2/pkg/storage/fs/ocis" 25 "github.com/cs3org/reva/v2/tests/helpers" 26 "github.com/rs/zerolog" 27 28 . "github.com/onsi/ginkgo/v2" 29 . "github.com/onsi/gomega" 30 ) 31 32 var _ = Describe("Ocis", func() { 33 var ( 34 options map[string]interface{} 35 tmpRoot string 36 ) 37 38 BeforeEach(func() { 39 tmpRoot, err := helpers.TempDir("reva-unit-tests-*-root") 40 Expect(err).ToNot(HaveOccurred()) 41 42 options = map[string]interface{}{ 43 "root": tmpRoot, 44 "share_folder": "/Shares", 45 "permissionssvc": "any", 46 } 47 }) 48 49 AfterEach(func() { 50 if tmpRoot != "" { 51 os.RemoveAll(tmpRoot) 52 } 53 }) 54 55 Describe("New", func() { 56 It("returns a new instance", func() { 57 _, err := ocis.New(options, nil, &zerolog.Logger{}) 58 Expect(err).ToNot(HaveOccurred()) 59 }) 60 }) 61 })