MCPcopy
hub / github.com/kopia/kopia / SkipTestOnCIUnlessLinuxAMD64

Function SkipTestOnCIUnlessLinuxAMD64

internal/testutil/testutil.go:47–53  ·  view source on GitHub ↗

SkipTestOnCIUnlessLinuxAMD64 skips the current test if running on CI unless the environment is Linux/AMD64.

(tb testing.TB)

Source from the content-addressed store, hash-verified

45
46// SkipTestOnCIUnlessLinuxAMD64 skips the current test if running on CI unless the environment is Linux/AMD64.
47func SkipTestOnCIUnlessLinuxAMD64(tb testing.TB) {
48 tb.Helper()
49
50 if os.Getenv("CI") != "" && runtime.GOOS+"/"+runtime.GOARCH != "linux/amd64" {
51 tb.Skip("test not supported in this environment.")
52 }
53}
54
55// ShouldReduceTestComplexity returns true if test complexity should be reduced on the current machine.
56func ShouldReduceTestComplexity() bool {

Callers 4

startDockerMinioOrSkipFunction · 0.92
TestSFTPStorageValidFunction · 0.92
TestParallelUploadDedupFunction · 0.92

Calls 1

HelperMethod · 0.80

Tested by 4

startDockerMinioOrSkipFunction · 0.74
TestSFTPStorageValidFunction · 0.74
TestParallelUploadDedupFunction · 0.74