@@ -175,9 +175,8 @@ devices:
175175 dir , err = mkTestDir (t , map [string ]map [string ]string {
176176 "etc" : tc .files ,
177177 })
178- if err != nil {
179- t .Errorf ("failed to populate test directory: %v" , err )
180- }
178+ require .NoError (t , err , "failed to populate test directory" )
179+
181180 dir = filepath .Join (dir , "etc" )
182181 success = map [string ]struct {}{}
183182 failure = map [string ]struct {}{}
@@ -186,7 +185,7 @@ devices:
186185 }
187186
188187 dirs := []string {"/no-such-dir" , dir }
189- err = scanSpecDirs (dirs , func (path string , prio int , spec * Spec , err error ) error {
188+ _ = scanSpecDirs (dirs , func (path string , prio int , spec * Spec , err error ) error {
190189 name := filepath .Base (path )
191190 if err != nil {
192191 failure [name ] = struct {}{}
@@ -220,14 +219,14 @@ func mkTestDir(t *testing.T, dirs map[string]map[string]string) (string, error)
220219 os .RemoveAll (tmp )
221220 })
222221
223- if err = updateTestDir (t , tmp , dirs ); err != nil {
222+ if err = updateTestDir (tmp , dirs ); err != nil {
224223 return "" , err
225224 }
226225
227226 return tmp , nil
228227}
229228
230- func updateTestDir (t * testing. T , tmp string , dirs map [string ]map [string ]string ) error {
229+ func updateTestDir (tmp string , dirs map [string ]map [string ]string ) error {
231230 for sub , content := range dirs {
232231 dir := filepath .Join (tmp , sub )
233232 if err := os .MkdirAll (dir , 0755 ); err != nil {
0 commit comments