(t *testing.T, path string, into interface{})
| 174 | } |
| 175 | |
| 176 | func readFileToStruct(t *testing.T, path string, into interface{}) { |
| 177 | bytes, err := ioutil.ReadFile(path) |
| 178 | if err != nil { |
| 179 | t.Fatalf("Failed to read test file from %s: %s", path, err.Error()) |
| 180 | } |
| 181 | err = yaml.Unmarshal(bytes, into) |
| 182 | if err != nil { |
| 183 | t.Fatalf("Failed to unmarshal file into struct: %s", err.Error()) |
| 184 | } |
| 185 | } |
no test coverage detected