3
0

Renamed temp ng-store variables to store

This commit is contained in:
Denis Arh
2020-09-15 20:19:46 +02:00
parent 5e55340759
commit 3a7cc105d0
32 changed files with 78 additions and 78 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ func Attachment(store objstore.Store) AttachmentService {
return (&attachment{
objects: store,
ac: DefaultAccessControl,
store: DefaultNgStore,
store: DefaultStore,
}).With(context.Background())
}
+1 -1
View File
@@ -53,7 +53,7 @@ func (svc chart) With(ctx context.Context) ChartService {
ctx: ctx,
actionlog: DefaultActionlog,
ac: svc.ac,
store: DefaultNgStore,
store: DefaultStore,
}
}
+1 -1
View File
@@ -64,7 +64,7 @@ func (svc module) With(ctx context.Context) ModuleService {
actionlog: DefaultActionlog,
ac: svc.ac,
eventbus: svc.eventbus,
store: DefaultNgStore,
store: DefaultStore,
}
}
+1 -1
View File
@@ -60,7 +60,7 @@ func (svc namespace) With(ctx context.Context) NamespaceService {
actionlog: DefaultActionlog,
ac: svc.ac,
eventbus: svc.eventbus,
store: DefaultNgStore,
store: DefaultStore,
}
}
+1 -1
View File
@@ -52,7 +52,7 @@ func Page() PageService {
return (&page{
ac: DefaultAccessControl,
eventbus: eventbus.Service(),
store: DefaultNgStore,
store: DefaultStore,
}).With(context.Background())
}
+1 -1
View File
@@ -136,7 +136,7 @@ func Record() RecordService {
ac: DefaultAccessControl,
eventbus: eventbus.Service(),
optEmitEvents: true,
store: DefaultNgStore,
store: DefaultStore,
}).With(context.Background())
}
+6 -6
View File
@@ -14,7 +14,7 @@ import (
"github.com/cortezaproject/corteza-server/pkg/objstore/plain"
"github.com/cortezaproject/corteza-server/pkg/options"
"github.com/cortezaproject/corteza-server/pkg/permissions"
ngStore "github.com/cortezaproject/corteza-server/store"
"github.com/cortezaproject/corteza-server/store"
systemService "github.com/cortezaproject/corteza-server/system/service"
"go.uber.org/zap"
"strconv"
@@ -41,10 +41,10 @@ type (
var (
DefaultObjectStore objstore.Store
// DefaultNgStore is an interface to storage backend(s)
// DefaultStore is an interface to storage backend(s)
// ng (next-gen) is a temporary prefix
// so that we can differentiate between it and the file-only store
DefaultNgStore ngStore.Storer
DefaultStore store.Storer
DefaultLogger *zap.Logger
@@ -75,12 +75,12 @@ var (
)
// Initializes compose-only services
func Initialize(ctx context.Context, log *zap.Logger, s ngStore.Storer, c Config) (err error) {
func Initialize(ctx context.Context, log *zap.Logger, s store.Storer, c Config) (err error) {
var (
hcd = healthcheck.Defaults()
)
DefaultNgStore = s
DefaultStore = s
DefaultLogger = log.Named("service")
@@ -95,7 +95,7 @@ func Initialize(ctx context.Context, log *zap.Logger, s ngStore.Storer, c Config
tee = log
}
DefaultActionlog = actionlog.NewService(DefaultNgStore, log, tee, policy)
DefaultActionlog = actionlog.NewService(DefaultStore, log, tee, policy)
}
if DefaultPermissions == nil {
+1 -1
View File
@@ -57,7 +57,7 @@ func Attachment(ctx context.Context, store files.Store) AttachmentService {
return (&attachment{
ac: DefaultAccessControl,
files: store,
store: DefaultNgStore,
store: DefaultStore,
}).With(ctx)
}
+1 -1
View File
@@ -75,7 +75,7 @@ const (
func Channel(ctx context.Context) ChannelService {
return (&channel{
store: DefaultNgStore,
store: DefaultStore,
ac: DefaultAccessControl,
actionlog: DefaultActionlog,
}).With(ctx)
+1 -1
View File
@@ -70,7 +70,7 @@ func Message(ctx context.Context) MessageService {
return (&message{
ac: DefaultAccessControl,
channel: DefaultChannel,
store: DefaultNgStore,
store: DefaultStore,
}).With(ctx)
}
+6 -6
View File
@@ -9,7 +9,7 @@ import (
"github.com/cortezaproject/corteza-server/pkg/objstore/plain"
"github.com/cortezaproject/corteza-server/pkg/options"
"github.com/cortezaproject/corteza-server/pkg/permissions"
ngStore "github.com/cortezaproject/corteza-server/store"
"github.com/cortezaproject/corteza-server/store"
"go.uber.org/zap"
"time"
)
@@ -33,10 +33,10 @@ type (
var (
DefaultObjectStore objstore.Store
// DefaultNgStore is an interface to storage backend(s)
// DefaultStore is an interface to storage backend(s)
// ng (next-gen) is a temporary prefix
// so that we can differentiate between it and the file-only store
DefaultNgStore ngStore.Storer
DefaultStore store.Storer
DefaultPermissions permissionServicer
@@ -53,14 +53,14 @@ var (
DefaultCommand CommandService
)
func Initialize(ctx context.Context, log *zap.Logger, s ngStore.Storer, c Config) (err error) {
func Initialize(ctx context.Context, log *zap.Logger, s store.Storer, c Config) (err error) {
var (
hcd = healthcheck.Defaults()
)
// we're doing conversion to avoid having
// store interface exposed or generated inside app package
DefaultNgStore = s
DefaultStore = s
DefaultLogger = log.Named("service")
@@ -75,7 +75,7 @@ func Initialize(ctx context.Context, log *zap.Logger, s ngStore.Storer, c Config
tee = log
}
DefaultActionlog = actionlog.NewService(DefaultNgStore, log, tee, policy)
DefaultActionlog = actionlog.NewService(DefaultStore, log, tee, policy)
}
if DefaultPermissions == nil {
+1 -1
View File
@@ -48,7 +48,7 @@ func Users(app serviceInitializer) *cobra.Command {
uf.Sort = filter.SortExprSet{&filter.SortExpr{Column: "updated_at"}}
uf.Limit = uint(limit)
users, _, err := service.DefaultNgStore.SearchUsers(ctx, uf)
users, _, err := service.DefaultStore.SearchUsers(ctx, uf)
cli.HandleError(err)
fmt.Fprintf(
+2 -2
View File
@@ -55,7 +55,7 @@ func Attachment(store files.Store) AttachmentService {
files: store,
actionlog: DefaultActionlog,
ac: DefaultAccessControl,
store: DefaultNgStore,
store: DefaultStore,
}).With(context.Background())
}
@@ -68,7 +68,7 @@ func (svc attachment) With(ctx context.Context) AttachmentService {
files: svc.files,
store: DefaultNgStore,
store: DefaultStore,
}
}
+1 -1
View File
@@ -72,7 +72,7 @@ func Auth() *auth {
notifications: DefaultAuthNotification,
actionlog: DefaultActionlog,
store: DefaultNgStore,
store: DefaultStore,
providerValidator: defaultProviderValidator,
}
+1 -1
View File
@@ -40,7 +40,7 @@ type (
func Reminder(ctx context.Context) ReminderService {
return &reminder{
ac: DefaultAccessControl,
store: DefaultNgStore,
store: DefaultStore,
}
}
+2 -2
View File
@@ -69,7 +69,7 @@ func Role(ctx context.Context) RoleService {
actionlog: DefaultActionlog,
user: DefaultUser.With(ctx),
store: DefaultNgStore,
store: DefaultStore,
}).With(ctx)
}
@@ -83,7 +83,7 @@ func (svc role) With(ctx context.Context) RoleService {
eventbus: svc.eventbus,
user: svc.user,
store: DefaultNgStore,
store: DefaultStore,
}
}
+9 -9
View File
@@ -13,7 +13,7 @@ import (
"github.com/cortezaproject/corteza-server/pkg/objstore/plain"
"github.com/cortezaproject/corteza-server/pkg/options"
"github.com/cortezaproject/corteza-server/pkg/permissions"
ngStore "github.com/cortezaproject/corteza-server/store"
"github.com/cortezaproject/corteza-server/store"
"github.com/cortezaproject/corteza-server/system/types"
"go.uber.org/zap"
"time"
@@ -45,10 +45,10 @@ type (
var (
DefaultObjectStore objstore.Store
// DefaultNgStore is an interface to storage backend(s)
// DefaultStore is an interface to storage backend(s)
// ng (next-gen) is a temporary prefix
// so that we can differentiate between it and the file-only store
DefaultNgStore ngStore.Storer
DefaultStore store.Storer
DefaultLogger *zap.Logger
@@ -107,14 +107,14 @@ var (
}
)
func Initialize(ctx context.Context, log *zap.Logger, s ngStore.Storer, c Config) (err error) {
func Initialize(ctx context.Context, log *zap.Logger, s store.Storer, c Config) (err error) {
var (
hcd = healthcheck.Defaults()
)
// we're doing conversion to avoid having
// store interface exposed or generated inside app package
DefaultNgStore = s
DefaultStore = s
DefaultLogger = log.Named("service")
@@ -129,18 +129,18 @@ func Initialize(ctx context.Context, log *zap.Logger, s ngStore.Storer, c Config
tee = log
}
DefaultActionlog = actionlog.NewService(DefaultNgStore, log, tee, policy)
DefaultActionlog = actionlog.NewService(DefaultStore, log, tee, policy)
}
if DefaultPermissions == nil {
// Do not override permissions service stored under DefaultPermissions
// to allow integration tests to inject own permission service
DefaultPermissions = permissions.Service(ctx, DefaultLogger, DefaultNgStore)
DefaultPermissions = permissions.Service(ctx, DefaultLogger, DefaultStore)
}
DefaultAccessControl = AccessControl(DefaultPermissions)
DefaultSettings = Settings(DefaultNgStore, DefaultLogger, DefaultAccessControl, CurrentSettings)
DefaultSettings = Settings(DefaultStore, DefaultLogger, DefaultAccessControl, CurrentSettings)
if DefaultObjectStore == nil {
const svcPath = "compose"
@@ -183,7 +183,7 @@ func Initialize(ctx context.Context, log *zap.Logger, s ngStore.Storer, c Config
DefaultAuth = Auth()
DefaultUser = User(ctx)
DefaultRole = Role(ctx)
DefaultApplication = Application(DefaultNgStore, DefaultAccessControl, DefaultActionlog, eventbus.Service())
DefaultApplication = Application(DefaultStore, DefaultAccessControl, DefaultActionlog, eventbus.Service())
DefaultReminder = Reminder(ctx)
DefaultSink = Sink()
DefaultStatistics = Statistics()
+1 -1
View File
@@ -30,7 +30,7 @@ func Statistics() *statistics {
return &statistics{
actionlog: DefaultActionlog,
ac: DefaultAccessControl,
store: DefaultNgStore,
store: DefaultStore,
}
}
+2 -2
View File
@@ -100,7 +100,7 @@ func User(ctx context.Context) UserService {
settings: CurrentSettings,
auth: DefaultAuth,
store: DefaultNgStore,
store: DefaultStore,
actionlog: DefaultActionlog,
@@ -326,7 +326,7 @@ func (svc user) Create(new *types.User) (u *types.User, err error) {
}
if new.Handle == "" {
createHandle(svc.ctx, DefaultNgStore, new)
createHandle(svc.ctx, DefaultStore, new)
}
if err = svc.UniqueCheck(new); err != nil {
+3 -3
View File
@@ -16,7 +16,7 @@ import (
func (h helper) clearCharts() {
h.clearNamespaces()
h.noError(store.TruncateComposeCharts(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateComposeCharts(context.Background(), service.DefaultStore))
}
func (h helper) makeChart(ns *types.Namespace, name string) *types.Chart {
@@ -28,12 +28,12 @@ func (h helper) makeChart(ns *types.Namespace, name string) *types.Chart {
NamespaceID: ns.ID,
}
h.noError(store.CreateComposeChart(context.Background(), service.DefaultNgStore, res))
h.noError(store.CreateComposeChart(context.Background(), service.DefaultStore, res))
return res
}
func (h helper) lookupChartByID(ID uint64) *types.Chart {
res, err := store.LookupComposeChartByID(context.Background(), service.DefaultNgStore, ID)
res, err := store.LookupComposeChartByID(context.Background(), service.DefaultStore, ID)
h.noError(err)
return res
}
+1 -1
View File
@@ -53,7 +53,7 @@ func InitTestApp() {
ctx := cli.Context()
testApp = helpers.NewIntegrationTestApp(ctx, func(app *app.CortezaApp) (err error) {
service.DefaultNgStore = app.Store
service.DefaultStore = app.Store
service.DefaultPermissions = permissions.NewTestService(ctx, zap.NewNop(), app.Store)
service.DefaultObjectStore, err = plain.NewWithAfero(afero.NewMemMapFs(), "test")
if err != nil {
+7 -7
View File
@@ -16,8 +16,8 @@ import (
func (h helper) clearModules() {
h.clearNamespaces()
h.noError(store.TruncateComposeModules(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateComposeModuleFields(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateComposeModules(context.Background(), service.DefaultStore))
h.noError(store.TruncateComposeModuleFields(context.Background(), service.DefaultStore))
}
func (h helper) makeModule(ns *types.Namespace, name string, ff ...*types.ModuleField) *types.Module {
@@ -32,7 +32,7 @@ func (h helper) makeModule(ns *types.Namespace, name string, ff ...*types.Module
func (h helper) createModule(res *types.Module) *types.Module {
res.ID = id.Next()
res.CreatedAt = time.Now()
h.noError(store.CreateComposeModule(context.Background(), service.DefaultNgStore, res))
h.noError(store.CreateComposeModule(context.Background(), service.DefaultStore, res))
_ = res.Fields.Walk(func(f *types.ModuleField) error {
f.ID = id.Next()
@@ -41,16 +41,16 @@ func (h helper) createModule(res *types.Module) *types.Module {
return nil
})
h.noError(store.CreateComposeModuleField(context.Background(), service.DefaultNgStore, res.Fields...))
h.noError(store.CreateComposeModuleField(context.Background(), service.DefaultStore, res.Fields...))
return res
}
func (h helper) lookupModuleByID(ID uint64) *types.Module {
res, err := store.LookupComposeModuleByID(context.Background(), service.DefaultNgStore, ID)
res, err := store.LookupComposeModuleByID(context.Background(), service.DefaultStore, ID)
h.noError(err)
res.Fields, _, err = store.SearchComposeModuleFields(context.Background(), service.DefaultNgStore, types.ModuleFieldFilter{ModuleID: []uint64{ID}})
res.Fields, _, err = store.SearchComposeModuleFields(context.Background(), service.DefaultStore, types.ModuleFieldFilter{ModuleID: []uint64{ID}})
h.noError(err)
return res
@@ -222,7 +222,7 @@ func TestModuleUpdate(t *testing.T) {
Assert(jsonpath.Present("$.response.updatedAt")).
End()
m, err := store.LookupComposeModuleByID(context.Background(), service.DefaultNgStore, m.ID)
m, err := store.LookupComposeModuleByID(context.Background(), service.DefaultStore, m.ID)
h.noError(err)
h.a.NotNil(m)
h.a.Equal("changed-name", m.Name)
+3 -3
View File
@@ -16,19 +16,19 @@ import (
)
func (h helper) clearNamespaces() {
h.noError(store.TruncateComposeNamespaces(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateComposeNamespaces(context.Background(), service.DefaultStore))
}
func (h helper) makeNamespace(name string) *types.Namespace {
ns := &types.Namespace{Name: name, Slug: name}
ns.ID = id.Next()
ns.CreatedAt = time.Now()
h.noError(store.CreateComposeNamespace(context.Background(), service.DefaultNgStore, ns))
h.noError(store.CreateComposeNamespace(context.Background(), service.DefaultStore, ns))
return ns
}
func (h helper) lookupNamespaceByID(ID uint64) *types.Namespace {
ns, err := store.LookupComposeNamespaceByID(context.Background(), service.DefaultNgStore, ID)
ns, err := store.LookupComposeNamespaceByID(context.Background(), service.DefaultStore, ID)
h.noError(err)
return ns
}
+4 -4
View File
@@ -16,7 +16,7 @@ import (
func (h helper) clearPages() {
h.clearNamespaces()
h.noError(store.TruncateComposePages(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateComposePages(context.Background(), service.DefaultStore))
}
func (h helper) repoMakePage(ns *types.Namespace, name string) *types.Page {
@@ -27,7 +27,7 @@ func (h helper) repoMakePage(ns *types.Namespace, name string) *types.Page {
NamespaceID: ns.ID,
}
h.noError(store.CreateComposePage(context.Background(), service.DefaultNgStore, res))
h.noError(store.CreateComposePage(context.Background(), service.DefaultStore, res))
return res
}
@@ -40,12 +40,12 @@ func (h helper) repoMakeWeightedPage(ns *types.Namespace, name string, weight in
Weight: weight,
}
h.noError(store.CreateComposePage(context.Background(), service.DefaultNgStore, res))
h.noError(store.CreateComposePage(context.Background(), service.DefaultStore, res))
return res
}
func (h helper) lookupPageByID(ID uint64) *types.Page {
res, err := store.LookupComposePageByID(context.Background(), service.DefaultNgStore, ID)
res, err := store.LookupComposePageByID(context.Background(), service.DefaultStore, ID)
h.noError(err)
return res
}
+1 -1
View File
@@ -60,7 +60,7 @@ func TestRecordExecOrganize(t *testing.T) {
assertSort := func(expectedHandles, expectedCats string) {
// Using record service for fetching to avoid value pre-fetching etc..
sorting, _ := filter.NewSorting("position ASC")
set, _, err := store.SearchComposeRecords(h.secCtx(), service.DefaultNgStore, module, types.RecordFilter{
set, _, err := store.SearchComposeRecords(h.secCtx(), service.DefaultStore, module, types.RecordFilter{
ModuleID: module.ID,
NamespaceID: module.NamespaceID,
Sorting: sorting,
+3 -3
View File
@@ -21,7 +21,7 @@ import (
func (h helper) clearRecords() {
h.clearNamespaces()
h.clearModules()
h.noError(store.TruncateComposeRecords(context.Background(), service.DefaultNgStore, nil))
h.noError(store.TruncateComposeRecords(context.Background(), service.DefaultStore, nil))
}
type (
@@ -105,13 +105,13 @@ func (h helper) makeRecord(module *types.Module, rvs ...*types.RecordValue) *typ
Values: rvs,
}
h.noError(store.CreateComposeRecord(context.Background(), service.DefaultNgStore, module, rec))
h.noError(store.CreateComposeRecord(context.Background(), service.DefaultStore, module, rec))
return rec
}
func (h helper) lookupRecordByID(module *types.Module, ID uint64) *types.Record {
res, err := store.LookupComposeRecordByID(context.Background(), service.DefaultNgStore, module, ID)
res, err := store.LookupComposeRecordByID(context.Background(), service.DefaultStore, module, ID)
h.noError(err)
return res
}
+4 -4
View File
@@ -18,7 +18,7 @@ func (h helper) repoMakePublicCh() *types.Channel {
Type: types.ChannelTypePublic,
}
h.a.NoError(store.CreateMessagingChannel(context.Background(), service.DefaultNgStore, ch))
h.a.NoError(store.CreateMessagingChannel(context.Background(), service.DefaultStore, ch))
return ch
}
@@ -30,7 +30,7 @@ func (h helper) repoMakePrivateCh() *types.Channel {
Type: types.ChannelTypePrivate,
}
h.a.NoError(store.CreateMessagingChannel(context.Background(), service.DefaultNgStore, ch))
h.a.NoError(store.CreateMessagingChannel(context.Background(), service.DefaultStore, ch))
return ch
}
@@ -41,14 +41,14 @@ func (h helper) repoMakeMember(ch *types.Channel, u *sysTypes.User) *types.Chann
UserID: u.ID,
Type: types.ChannelMembershipTypeMember,
}
h.a.NoError(store.CreateMessagingChannelMember(context.Background(), service.DefaultNgStore, m))
h.a.NoError(store.CreateMessagingChannelMember(context.Background(), service.DefaultStore, m))
return m
}
func (h helper) lookupChMembership(ch *types.Channel) types.ChannelMemberSet {
f := types.ChannelMemberFilter{ChannelID: []uint64{ch.ID}}
mm, _, err := store.SearchMessagingChannelMembers(context.Background(), service.DefaultNgStore, f)
mm, _, err := store.SearchMessagingChannelMembers(context.Background(), service.DefaultStore, f)
h.a.NoError(err)
return mm
}
+3 -3
View File
@@ -28,7 +28,7 @@ func (h helper) makeMessage(msg string, ch *types.Channel, u *sysTypes.User) *ty
ChannelID: ch.ID,
UserID: u.ID,
}
err := store.CreateMessagingMessage(context.Background(), service.DefaultNgStore, m)
err := store.CreateMessagingMessage(context.Background(), service.DefaultStore, m)
h.a.NoError(err)
return m
@@ -56,11 +56,11 @@ func (h helper) apiMessageCreateReply(msg string, o *types.Message) *types.Messa
}
func (h helper) lookupMessageByID(ID uint64) (*types.Message, error) {
return store.LookupMessagingMessageByID(context.Background(), service.DefaultNgStore, ID)
return store.LookupMessagingMessageByID(context.Background(), service.DefaultStore, ID)
}
func (h helper) lookupFlagByMessageID(ID uint64) types.MessageFlagSet {
ff, _, err := store.SearchMessagingFlags(context.Background(), service.DefaultNgStore, types.MessageFlagFilter{MessageID: []uint64{ID}})
ff, _, err := store.SearchMessagingFlags(context.Background(), service.DefaultStore, types.MessageFlagFilter{MessageID: []uint64{ID}})
h.a.NoError(err)
return ff
}
+3 -3
View File
@@ -15,7 +15,7 @@ import (
)
func (h helper) clearApplications() {
h.noError(store.TruncateApplications(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateApplications(context.Background(), service.DefaultStore))
}
func (h helper) repoMakeApplication(ss ...string) *types.Application {
@@ -31,13 +31,13 @@ func (h helper) repoMakeApplication(ss ...string) *types.Application {
res.Name = "n_" + rs()
}
h.a.NoError(store.CreateApplication(context.Background(), service.DefaultNgStore, res))
h.a.NoError(store.CreateApplication(context.Background(), service.DefaultStore, res))
return res
}
func (h helper) lookupApplicationByID(ID uint64) *types.Application {
res, err := store.LookupApplicationByID(context.Background(), service.DefaultNgStore, ID)
res, err := store.LookupApplicationByID(context.Background(), service.DefaultStore, ID)
h.noError(err)
return res
}
+1 -1
View File
@@ -70,7 +70,7 @@ func InitTestApp() {
return err
}
service.DefaultNgStore, err = sqlite3.ConnectInMemory(ctx)
service.DefaultStore, err = sqlite3.ConnectInMemory(ctx)
if err != nil {
return err
}
+3 -3
View File
@@ -15,7 +15,7 @@ import (
)
func (h helper) clearRoles() {
h.noError(store.TruncateRoles(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateRoles(context.Background(), service.DefaultStore))
}
func (h helper) repoMakeRole(ss ...string) *types.Role {
@@ -36,13 +36,13 @@ func (h helper) repoMakeRole(ss ...string) *types.Role {
r.Name = "n_" + rs()
}
h.a.NoError(store.CreateRole(context.Background(), service.DefaultNgStore, r))
h.a.NoError(store.CreateRole(context.Background(), service.DefaultStore, r))
return r
}
func (h helper) lookupRoleByID(ID uint64) *types.Role {
res, err := store.LookupRoleByID(context.Background(), service.DefaultNgStore, ID)
res, err := store.LookupRoleByID(context.Background(), service.DefaultStore, ID)
h.noError(err)
return res
}
+2 -2
View File
@@ -31,12 +31,12 @@ func (h helper) createUser(user *types.User) *types.User {
user.CreatedAt = time.Now()
}
h.a.NoError(service.DefaultNgStore.CreateUser(context.Background(), user))
h.a.NoError(service.DefaultStore.CreateUser(context.Background(), user))
return user
}
func (h helper) clearUsers() {
h.noError(store.TruncateUsers(context.Background(), service.DefaultNgStore))
h.noError(store.TruncateUsers(context.Background(), service.DefaultStore))
}
func TestUserRead(t *testing.T) {