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)
|
||||
}
|
||||
|
||||
InitWorkers(PushConf.Core.WorkerNum, PushConf.Core.QueueNum)
|
||||
|
||||
if err := InitAppStatus(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func init() {
|
||||
PushConf = config.BuildDefaultPushConf()
|
||||
InitWorkers(PushConf.Core.WorkerNum, PushConf.Core.QueueNum)
|
||||
}
|
||||
func TestCorrectConf(t *testing.T) {
|
||||
PushConf = config.BuildDefaultPushConf()
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ type IosStatus struct {
|
|||
|
||||
// InitAppStatus for initialize app status
|
||||
func InitAppStatus() error {
|
||||
LogAccess.Debug("Init App Status Engine as ", PushConf.Stat.Engine)
|
||||
switch PushConf.Stat.Engine {
|
||||
case "memory":
|
||||
StatStorage = memory.New()
|
||||
|
|
Loading…
Reference in New Issue