add init func for testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
510265bb5b
commit
04b97019c8
|
@ -16,6 +16,8 @@ func init() {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InitWorkers(PushConf.Core.WorkerNum, PushConf.Core.QueueNum)
|
||||||
|
|
||||||
if err := InitAppStatus(); err != nil {
|
if err := InitAppStatus(); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,6 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
PushConf = config.BuildDefaultPushConf()
|
|
||||||
InitWorkers(PushConf.Core.WorkerNum, PushConf.Core.QueueNum)
|
|
||||||
}
|
|
||||||
func TestCorrectConf(t *testing.T) {
|
func TestCorrectConf(t *testing.T) {
|
||||||
PushConf = config.BuildDefaultPushConf()
|
PushConf = config.BuildDefaultPushConf()
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ type IosStatus struct {
|
||||||
|
|
||||||
// InitAppStatus for initialize app status
|
// InitAppStatus for initialize app status
|
||||||
func InitAppStatus() error {
|
func InitAppStatus() error {
|
||||||
|
LogAccess.Debug("Init App Status Engine as ", PushConf.Stat.Engine)
|
||||||
switch PushConf.Stat.Engine {
|
switch PushConf.Stat.Engine {
|
||||||
case "memory":
|
case "memory":
|
||||||
StatStorage = memory.New()
|
StatStorage = memory.New()
|
||||||
|
|
Loading…
Reference in New Issue