diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7ddf8dcc7..0c8566d53 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,7 +26,6 @@ jobs: env: CGO_ENABLED: 0 GO111MODULE: on - MINIO_CI_CD: 1 run: | go build --ldflags="-s -w" -o %GOPATH%\bin\minio.exe go test -v --timeout 50m ./... @@ -35,7 +34,6 @@ jobs: env: CGO_ENABLED: 0 GO111MODULE: on - MINIO_CI_CD: 1 run: | sudo sysctl net.ipv6.conf.all.disable_ipv6=0 sudo sysctl net.ipv6.conf.default.disable_ipv6=0 diff --git a/cmd/test-utils_test.go b/cmd/test-utils_test.go index 47b172bd9..aa1d54454 100644 --- a/cmd/test-utils_test.go +++ b/cmd/test-utils_test.go @@ -115,6 +115,8 @@ func TestMain(m *testing.M) { resetTestGlobals() + os.Setenv("MINIO_CI_CD", "ci") + os.Exit(m.Run()) } diff --git a/cmd/xl-storage.go b/cmd/xl-storage.go index 87bdc8224..f596ff956 100644 --- a/cmd/xl-storage.go +++ b/cmd/xl-storage.go @@ -240,9 +240,14 @@ func newXLStorage(ep Endpoint) (*xlStorage, error) { return nil, err } - rootDisk, err := disk.IsRootDisk(path, "/") - if err != nil { - return nil, err + var rootDisk bool + if env.Get("MINIO_CI_CD", "") != "" { + rootDisk = true + } else { + rootDisk, err = disk.IsRootDisk(path, "/") + if err != nil { + return nil, err + } } p := &xlStorage{