func TestStart(t *testing.T) {
	db.Init("test")
	models.RegisterEntry()
	models.RegisterValve()
	models.RegisterSchedule()

	err := db.Create()
	if err != nil {
		t.Fail()
		t.Log(err)
	}

}
Beispiel #2
0
func main() {
	config.ReadConfigFile(configFile)
	path, err := config.GetString("database")
	if err != nil {
		log.Panicln("No database file specified in config file.")
		os.Exit(1)
	}
	db.Init(path)
	models.RegisterEntry()
	models.RegisterValve()
	models.RegisterSchedule()

	flag.Parse()
	flag.Visit(actionFlag)

	flag.PrintDefaults()
}