diff --git a/functional-tests/admin_tests/admin_test.sh b/functional-tests/admin_tests/admin_test.sh index 3cd62e0..f85b92a 100755 --- a/functional-tests/admin_tests/admin_test.sh +++ b/functional-tests/admin_tests/admin_test.sh @@ -8,8 +8,12 @@ PROXY_URL=${PROXY_URL:-"http://localhost"} DIR="$( cd "$( dirname "$0" )" && pwd )" # domain setup - -id=$(uuid) +# check if uuid is available +if ! command -v uuid > /dev/null; then + id=x-$RANDOM-$RANDOM-$RANDOM +else + id=$(uuid) +fi dgate-cli namespace create name=ns-$id diff --git a/pkg/storage/file_storage.go b/pkg/storage/file_storage.go index ccf9227..3313ef1 100644 --- a/pkg/storage/file_storage.go +++ b/pkg/storage/file_storage.go @@ -65,12 +65,9 @@ func NewFileStore(fsConfig *FileStoreConfig) *FileStore { func (s *FileStore) Connect() (err error) { filePath := path.Join(s.directory, "dgate.db") - if s.db, err = bolt.Open(filePath, - 0755, bolt.DefaultOptions, - ); err != nil { + if s.db, err = bolt.Open(filePath, 0755, nil); err != nil { return err - } - if tx, err := s.db.Begin(true); err != nil { + } else if tx, err := s.db.Begin(true); err != nil { return err } else { _, err = tx.CreateBucketIfNotExists(s.bucketName)