mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
38 lines
541 B
Go
38 lines
541 B
Go
package testutils
|
|
|
|
import (
|
|
"os"
|
|
"runtime"
|
|
"testing"
|
|
)
|
|
|
|
func RequiresDocker(t *testing.T) {
|
|
if os.Getenv("TEST_DOCKER") != "1" {
|
|
t.SkipNow()
|
|
}
|
|
}
|
|
|
|
func RequiresFUSE(t *testing.T) {
|
|
if os.Getenv("TEST_FUSE") != "1" {
|
|
t.SkipNow()
|
|
}
|
|
}
|
|
|
|
func RequiresExpensive(t *testing.T) {
|
|
if os.Getenv("TEST_EXPENSIVE") == "1" || testing.Short() {
|
|
t.SkipNow()
|
|
}
|
|
}
|
|
|
|
func RequiresPlugins(t *testing.T) {
|
|
if os.Getenv("TEST_PLUGIN") != "1" {
|
|
t.SkipNow()
|
|
}
|
|
}
|
|
|
|
func RequiresLinux(t *testing.T) {
|
|
if runtime.GOOS != "linux" {
|
|
t.SkipNow()
|
|
}
|
|
}
|