diff --git a/filesystem/fat32/fat32_test.go b/filesystem/fat32/fat32_test.go index 3f107155..5508cd26 100644 --- a/filesystem/fat32/fat32_test.go +++ b/filesystem/fat32/fat32_test.go @@ -1151,8 +1151,8 @@ func mkGigFile(fs filesystem.FileSystem, name string) error { func TestCreateFileTree(t *testing.T) { fileName := "file-tree.img" os.Remove(fileName) - f, err := mkfs(fileName) - err = mkdir(f, "/A") + f, _ := mkfs(fileName) + err := mkdir(f, "/A") if err != nil { t.Errorf("Error making dir /A in root: %v", err) } @@ -1178,7 +1178,7 @@ func TestCreateFileTree(t *testing.T) { if err != nil { t.Errorf("Error making directory,"+"/b/sub"+inc+"/blob/microfile: %v", err) } - err = mkRandFile(f, "/b/sub"+inc+"/blob/randfile", rand.Int32N(73)) + err = mkRandFile(f, "/b/sub"+inc+"/blob/randfile", rand.Int32N(73)) // #nosec G404 if err != nil { t.Errorf("Error making directory,"+"/b/sub"+inc+"/blob/randfile: %v", err) } @@ -1186,7 +1186,6 @@ func TestCreateFileTree(t *testing.T) { if err != nil { t.Errorf("Error making directory,"+"/b/sub"+inc+"/blob/smallfile: %v", err) } - } err = mkGigFile(f, "/b/sub49/blob/gigfile1") if err != nil {