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