if err != nil {
t.Fatal(err)
}
- defer os.Chdir(cwd)
+ defer os.Chdir(cwd) //nolint:errcheck
sliceToHosts := func(hosts []*Host) *Hosts {
res := &Hosts{
nil,
},
+ {
+ "../testdata/host-invalid-duplicate",
+ nil,
+ fmt.Errorf("hosts.yaml: host \"host1.example.org\": host name already exists"),
+ },
{
"../testdata/host-invalid-all",
nil,