This commit is stacked on top of #164. That must be reviewed and merged first.
Reason
To prevent regressions, we want good test coverage no matter the FileCopyMethod used. We also want to make sure other FileCopyMethods behave like CopyBytes when successful for consistency.
Instead of writing many tests to check the behaviour is the same, we re-use existing tests to check that other FileCopyMethods work like CopyBytes. The CI runs then runs these tests so the developer does not need different operating systems and the right filesystems installed.
Details
This series of commits changes the CI and testing so that:
The default FileCopyMethod can be changed just in tests using an environment variable.
The CI has more OS variants for using specific filesystems.
e.g. btrfs for testing copy-on-write (aka reflink)
The CI can choose which FileCopyMethod to use.
Example
This was a run to ensure the copy-on-write (reflink) implementation works.
Previous runs helped me catch a couple edge cases:
opt.FS != nil
opt.WrapReader != nil
That would not have been as easy without these changes.
This commit is stacked on top of #164. That must be reviewed and merged first.
Reason
To prevent regressions, we want good test coverage no matter the
FileCopyMethod
used. We also want to make sure otherFileCopyMethod
s behave likeCopyBytes
when successful for consistency.Instead of writing many tests to check the behaviour is the same, we re-use existing tests to check that other
FileCopyMethod
s work likeCopyBytes
. The CI runs then runs these tests so the developer does not need different operating systems and the right filesystems installed.Details
This series of commits changes the CI and testing so that:
FileCopyMethod
can be changed just in tests using an environment variable.btrfs
for testing copy-on-write (aka reflink)FileCopyMethod
to use.Example
This was a run to ensure the copy-on-write (reflink) implementation works.
Previous runs helped me catch a couple edge cases:
opt.FS != nil
opt.WrapReader != nil
That would not have been as easy without these changes.