mirror of
https://github.com/kopia/kopia.git
synced 2026-01-25 14:58:00 -05:00
* use `os.CreateTemp` in `tempfile.CreateAutoDelete` * refactor `TestTempFile`: add `VerifyTempfile` test helper * add test for `createUnixFallback` * rename function to `tempfile.CreateAutoDelete` * remove the `dir` parameter to `tempfile.CreateAutoDelete`, only an empty string was passed, apart from test cases. * guard against panic in TestShadowCopy
17 lines
418 B
Go
17 lines
418 B
Go
//go:build linux
|
|
// +build linux
|
|
|
|
package tempfile
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// Explicitly test the create fallback function.
|
|
// This test only applies to Linux to explicitly test the fallback function.
|
|
// In other unix platforms the fallback is the default implementation, so it
|
|
// is already tested in the tests for the Create function.
|
|
func TestCreateFallback(t *testing.T) {
|
|
VerifyTempfile(t, createUnixFallback)
|
|
}
|