修改 Bootstrap 注入 Gateway Client 依赖到 IotCardHandler 和 DeviceHandler
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/internal/model"
|
||||
accountService "github.com/break/junhong_cmp_fiber/internal/service/account"
|
||||
accountAuditService "github.com/break/junhong_cmp_fiber/internal/service/account_audit"
|
||||
postgresStore "github.com/break/junhong_cmp_fiber/internal/store/postgres"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/constants"
|
||||
"github.com/break/junhong_cmp_fiber/tests/testutils/integ"
|
||||
@@ -21,7 +22,11 @@ func TestAccountRoleAssociation_AssignRoles(t *testing.T) {
|
||||
accountStore := postgresStore.NewAccountStore(env.TX, env.Redis)
|
||||
roleStore := postgresStore.NewRoleStore(env.TX)
|
||||
accountRoleStore := postgresStore.NewAccountRoleStore(env.TX, env.Redis)
|
||||
accService := accountService.New(accountStore, roleStore, accountRoleStore)
|
||||
shopStore := postgresStore.NewShopStore(env.TX, env.Redis)
|
||||
enterpriseStore := postgresStore.NewEnterpriseStore(env.TX, env.Redis)
|
||||
auditLogStore := postgresStore.NewAccountOperationLogStore(env.TX)
|
||||
auditService := accountAuditService.NewService(auditLogStore)
|
||||
accService := accountService.New(accountStore, roleStore, accountRoleStore, shopStore, enterpriseStore, auditService)
|
||||
|
||||
// 获取超级管理员上下文
|
||||
userCtx := env.GetSuperAdminContext()
|
||||
@@ -213,7 +218,11 @@ func TestAccountRoleAssociation_SoftDelete(t *testing.T) {
|
||||
accountStore := postgresStore.NewAccountStore(env.TX, env.Redis)
|
||||
roleStore := postgresStore.NewRoleStore(env.TX)
|
||||
accountRoleStore := postgresStore.NewAccountRoleStore(env.TX, env.Redis)
|
||||
accService := accountService.New(accountStore, roleStore, accountRoleStore)
|
||||
shopStore := postgresStore.NewShopStore(env.TX, env.Redis)
|
||||
enterpriseStore := postgresStore.NewEnterpriseStore(env.TX, env.Redis)
|
||||
auditLogStore := postgresStore.NewAccountOperationLogStore(env.TX)
|
||||
auditService := accountAuditService.NewService(auditLogStore)
|
||||
accService := accountService.New(accountStore, roleStore, accountRoleStore, shopStore, enterpriseStore, auditService)
|
||||
|
||||
// 获取超级管理员上下文
|
||||
userCtx := env.GetSuperAdminContext()
|
||||
|
||||
Reference in New Issue
Block a user