You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
384 B

package common
import (
"sendmsg/global"
"sendmsg/model"
"testing"
)
func TestConfig(t *testing.T) {
global.GLO_CONF_CH = make(chan model.Config)
config, err := InitConfig()
if err != nil {
t.Fatalf("Failed to initialize config: %v", err)
}
t.Log(config)
var count int
for {
if count > 5 {
return
}
config = <-global.GLO_CONF_CH
count++
t.Log(config)
}
}