V2bX/conf/conf_test.go

20 lines
346 B
Go
Raw Normal View History

2023-04-07 01:11:56 -04:00
package conf
2023-05-21 23:20:09 -04:00
2023-06-01 22:18:10 -04:00
import (
"log"
"testing"
)
2023-05-21 23:20:09 -04:00
func TestConf_LoadFromPath(t *testing.T) {
c := New()
2023-06-01 21:19:37 -04:00
t.Log(c.LoadFromPath("../example/config.yml.example"), c.NodesConfig[0].ControllerConfig.LimitConfig.IPLimit)
2023-05-21 23:20:09 -04:00
}
2023-06-01 22:18:10 -04:00
func TestConf_Watch(t *testing.T) {
c := New()
c.Watch("../example/config.yml.example", func() {
log.Println(1)
})
select {}
}