rebase; extract factories and the mocks they are dependent on to
libraries/shared; adjust omni test_helpers to drop and recreate checked_headers table to avoid reaching 1600 column limit after repeated tests (dropping columns doesn't actually remove them from contributing to that limit)
This commit is contained in:
@@ -62,18 +62,16 @@ func CopyFile(src, dst string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer in.Close()
|
||||
out, err := os.OpenFile(dst, syscall.O_CREAT|syscall.O_EXCL|os.O_WRONLY, os.FileMode(0666)) // Doesn't overwrite files
|
||||
if err != nil {
|
||||
in.Close()
|
||||
return err
|
||||
}
|
||||
defer out.Close()
|
||||
|
||||
_, err = io.Copy(out, in)
|
||||
if err != nil {
|
||||
in.Close()
|
||||
out.Close()
|
||||
return err
|
||||
}
|
||||
in.Close()
|
||||
return out.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user