mirror of
https://github.com/rclone/rclone.git
synced 2024-12-24 13:03:51 +08:00
bd8523f208
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.
21 lines
355 B
Go
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")
|
|
}
|