configworker/config_test.go

25 lines
374 B
Go
Raw Normal View History

2020-01-02 18:12:31 +00:00
package main
import "testing"
func TestLoadConifg(t *testing.T) {
config := loadConfig()
if len(config.Users) >= 2 {
if value, ok := config.Users["eson"]; !ok {
t.Error(value)
}
if value, ok := config.GetUser("admin"); !ok {
t.Error(value)
}
}
2020-01-05 18:38:55 +00:00
if len(config.Paths) < 1 {
t.Error(config)
}
if len(config.Permit) < 1 {
t.Error(config.Permit)
}
2020-01-02 18:12:31 +00:00
}