Skip to content

Commit

Permalink
Skip tests that are too difficult for Windows Docker (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed May 15, 2020
1 parent f6e43e0 commit a4ab282
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/ddev/cmd/describe_test.go
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"github.com/drud/ddev/pkg/dockerutil"
"github.com/stretchr/testify/require"
"runtime"
"strings"
"testing"

Expand Down Expand Up @@ -219,6 +220,11 @@ func unmarshalJSONLogs(in string) ([]log.Fields, error) {
func TestCmdDescribeMissingProjectDirectory(t *testing.T) {
var err error
var out string

if runtime.GOOS == "windows" {
t.Skip("Skipping because unreliable on Windows")
}

assert := asrt.New(t)

projDir, _ := os.Getwd()
Expand Down
6 changes: 6 additions & 0 deletions cmd/ddev/cmd/pause_test.go
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/drud/ddev/pkg/dockerutil"
"github.com/stretchr/testify/require"
"os"
"runtime"
"testing"

"path/filepath"
Expand Down Expand Up @@ -64,6 +65,11 @@ func TestCmdPauseContainers(t *testing.T) {
func TestCmdPauseContainersMissingProjectDirectory(t *testing.T) {
var err error
var out string

if runtime.GOOS == "windows" {
t.Skip("Skipping because unreliable on Windows")
}

assert := asrt.New(t)

projDir, _ := os.Getwd()
Expand Down
6 changes: 6 additions & 0 deletions cmd/ddev/cmd/start_test.go
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/drud/ddev/pkg/dockerutil"
"github.com/stretchr/testify/require"
"path/filepath"
"runtime"
"testing"

"os"
Expand Down Expand Up @@ -62,6 +63,11 @@ func TestCmdStart(t *testing.T) {
func TestCmdStartMissingProjectDirectory(t *testing.T) {
var err error
var out string

if runtime.GOOS == "windows" {
t.Skip("Skipping because unreliable on Windows")
}

assert := asrt.New(t)

projDir, _ := os.Getwd()
Expand Down
5 changes: 5 additions & 0 deletions cmd/ddev/cmd/stop_test.go
Expand Up @@ -65,6 +65,11 @@ func TestCmdStop(t *testing.T) {
func TestCmdStopMissingProjectDirectory(t *testing.T) {
var err error
var out string

if runtime.GOOS == "windows" {
t.Skip("Skipping because unreliable on Windows")
}

assert := asrt.New(t)
projDir, _ := os.Getwd()

Expand Down
11 changes: 11 additions & 0 deletions pkg/ddevapp/ddevapp_test.go
Expand Up @@ -1948,6 +1948,10 @@ func TestDdevPause(t *testing.T) {

// TestDdevStopMissingDirectory tests that the 'ddev stop' command works properly on sites with missing directories or ddev configs.
func TestDdevStopMissingDirectory(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Skipping because unreliable on Windows")
}

assert := asrt.New(t)

site := TestSites[0]
Expand Down Expand Up @@ -2050,6 +2054,10 @@ func TestDdevDescribe(t *testing.T) {

// TestDdevDescribeMissingDirectory tests that the describe command works properly on sites with missing directories or ddev configs.
func TestDdevDescribeMissingDirectory(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Skipping because unreliable on Windows")
}

assert := asrt.New(t)
site := TestSites[0]
tempPath := testcommon.CreateTmpDir("site-copy")
Expand Down Expand Up @@ -2266,6 +2274,9 @@ func TestRouterNotRunning(t *testing.T) {
// TestListWithoutDir prevents regression where ddev list panics if one of the
// sites found is missing a directory
func TestListWithoutDir(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Skipping because unreliable on Windows")
}
// Set up tests and give ourselves a working directory.
assert := asrt.New(t)
testcommon.ClearDockerEnv()
Expand Down

0 comments on commit a4ab282

Please sign in to comment.