1
mirror of https://github.com/rclone/rclone synced 2024-11-27 05:23:40 +01:00
rclone/fstest/testy/testy.go
Nick Craig-Wood bd8523f208 fstest: reduce precision of directory time checks on CI
For unknown reasons the precision of modification times of directories
on the CI is > 15mS compared to files which are 100nS. The tests
work fine when run in Virtualbox though so I conjecture this is
something to do with the file system used there.
2024-05-03 12:29:18 +01:00

21 lines
355 B
Go

// Package testy contains test utilities for rclone
package testy
import (
"os"
"testing"
)
// CI returns true if we are running on the CI server
func CI() bool {
return os.Getenv("CI") != ""
}
// SkipUnreliable skips this test if running on CI
func SkipUnreliable(t *testing.T) {
if !CI() {
return
}
t.Skip("Skipping Unreliable Test on CI")
}