@@ -7,6 +7,7 @@ import (
|
||||
|
||||
olog "github.com/owncloud/ocis/ocis-pkg/log"
|
||||
settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0"
|
||||
"github.com/owncloud/ocis/settings/pkg/config"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -17,6 +18,7 @@ var (
|
||||
s = &Store{
|
||||
Logger: logger,
|
||||
l: &sync.Mutex{},
|
||||
cfg: config.DefaultConfig(),
|
||||
}
|
||||
|
||||
logger = olog.NewLogger(
|
||||
|
||||
@@ -50,7 +50,7 @@ func (s *Store) ListBundles(bundleType settingsmsg.Bundle_Type, bundleIDs []stri
|
||||
return bundles, nil
|
||||
}
|
||||
|
||||
// ReadBundle tries to find a bundle by the given id within the dataPath.
|
||||
// ReadBundle tries to find a bundle by the given id from the metadata service
|
||||
func (s *Store) ReadBundle(bundleID string) (*settingsmsg.Bundle, error) {
|
||||
if s.mdc == nil {
|
||||
return defaultBundle(settingsmsg.Bundle_TYPE_ROLE, bundleID)[0], nil
|
||||
|
||||
@@ -2,7 +2,6 @@ package store
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -78,9 +77,7 @@ func (c *CachedMDC) ReadDir(ctx context.Context, id string) ([]string, error) {
|
||||
return i.([]string), nil
|
||||
}
|
||||
|
||||
fmt.Println("readdir calling metadataservice", id)
|
||||
s, err := c.next.ReadDir(ctx, id)
|
||||
fmt.Println("readdir calling metadataservice result", s, err)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user