GODT-1364: Add windows CI machine for tests, and build

This commit is contained in:
Jakub
2022-01-13 16:48:33 +01:00
committed by Jakub Cuth
parent f7ed3abcfe
commit fc69b9aabb
8 changed files with 144 additions and 45 deletions

View File

@ -63,10 +63,16 @@ func NewOnDiskCache(path string, cmp Compressor, opts Options) (Cache, error) {
}
file, err := ioutil.TempFile(path, "tmp")
defer func() {
file.Close() //nolint[errcheck]
os.Remove(file.Name()) //nolint[errcheck]
}()
if err != nil {
return nil, fmt.Errorf("cannot open test write target: %w", err)
}
if _, err := file.Write([]byte("test-write")); err != nil {
return nil, fmt.Errorf("cannot write to target: %w", err)
}
os.Remove(file.Name()) //nolint[errcheck]
usage := du.NewDiskUsage(path)