slimming/config_test.go

24 lines
295 B
Go
Raw Normal View History

2022-08-25 07:31:51 +00:00
package main
import (
"log"
"os"
"testing"
"gopkg.in/yaml.v3"
)
func TestConfig(t *testing.T) {
cnf := &Config{}
f, err := os.Open("config.yaml")
if err != nil {
log.Panic(err)
}
dec := yaml.NewDecoder(f)
err = dec.Decode(cnf)
if err != nil {
log.Panic(err)
}
t.Error(cnf)
}