-// Copyright (C) 2021 Simon Ruderich
+// Copyright (C) 2021-2024 Simon Ruderich
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
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,