diff --git a/cmd/ddev/cmd/config_test.go b/cmd/ddev/cmd/config_test.go index 2fe219a61fa..e067494d965 100644 --- a/cmd/ddev/cmd/config_test.go +++ b/cmd/ddev/cmd/config_test.go @@ -684,10 +684,10 @@ func TestConfigGitignore(t *testing.T) { out = strings.ReplaceAll(out, "new file: .ddev/config.yaml", "") assert.NotContains(out, "new file:") - _, err = exec.RunHostCommand("bash", "-c", fmt.Sprintf(`touch "/%s" "/%s"`, filepath.Join(globalDdevDir, "commands", "web", t.Name()), filepath.Join(globalDdevDir, "homeadditions", t.Name()))) + _, err = exec.RunHostCommand("bash", "-c", fmt.Sprintf(`touch "%s" "%s"`, filepath.Join(globalDdevDir, "commands", "web", t.Name()), filepath.Join(globalDdevDir, "homeadditions", t.Name()))) assert.NoError(err) if err != nil { - out, err = exec.RunHostCommand("bash", "-c", fmt.Sprintf(`ls -l "/%s" && ls -lR "/%s" "/%s"`, globalDdevDir, filepath.Join(globalDdevDir, "commands"), filepath.Join(globalDdevDir, "homeadditions"))) + out, err = exec.RunHostCommand("bash", "-c", fmt.Sprintf(`ls -l "%s" && ls -lR "%s" "%s"`, globalDdevDir, filepath.Join(globalDdevDir, "commands"), filepath.Join(globalDdevDir, "homeadditions"))) assert.NoError(err) t.Logf("Contents of global .ddev: \n=====\n%s\n====", out) } diff --git a/pkg/dockerutil/docker_compose_version_test.go b/pkg/dockerutil/docker_compose_version_test.go index 47578aeff93..e5a759b8599 100644 --- a/pkg/dockerutil/docker_compose_version_test.go +++ b/pkg/dockerutil/docker_compose_version_test.go @@ -25,6 +25,9 @@ func TestDockerComposeDownload(t *testing.T) { DdevBin = os.Getenv("DDEV_BINARY_FULLPATH") } + _, err = dockerutil.DownloadDockerComposeIfNeeded() + require.NoError(t, err) + tmpXdgConfigHomeDir := testcommon.CopyGlobalDdevDir(t) t.Cleanup(func() { diff --git a/pkg/testcommon/testcommon.go b/pkg/testcommon/testcommon.go index c255eeb7482..b484392e83d 100644 --- a/pkg/testcommon/testcommon.go +++ b/pkg/testcommon/testcommon.go @@ -281,8 +281,7 @@ func ResetGlobalDdevDir(t *testing.T, tmpXdgConfigHomeDir string) { // After the $XDG_CONFIG_HOME directory is removed, // globalconfig.GetGlobalDdevDir() should point to ~/.ddev t.Setenv("XDG_CONFIG_HOME", "") - err := os.RemoveAll(tmpXdgConfigHomeDir) - require.NoError(t, err) + _ = os.RemoveAll(tmpXdgConfigHomeDir) // Make sure that the global config directory is set to ~/.ddev originalGlobalDdevDir := globalconfig.GetGlobalDdevDirLocation() require.Equal(t, originalGlobalDdevDir, globalconfig.GetGlobalDdevDir()) @@ -291,7 +290,7 @@ func ResetGlobalDdevDir(t *testing.T, tmpXdgConfigHomeDir string) { // refresh the global config from ~/.ddev globalconfig.EnsureGlobalConfig() // Reset $MUTAGEN_DATA_DIRECTORY - err = os.Unsetenv("MUTAGEN_DATA_DIRECTORY") + err := os.Unsetenv("MUTAGEN_DATA_DIRECTORY") require.NoError(t, err) // Start mutagen daemon if it's enabled if globalconfig.DdevGlobalConfig.IsMutagenEnabled() {