Skip to content

Commit

Permalink
fix: do not run tests in Parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
juev committed Dec 6, 2023
1 parent f8d305e commit e686093
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions gobrew_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
)

func TestNewGobrewHomeDirUsesUserHomeDir(t *testing.T) {
t.Parallel()
homeDir, err := os.UserHomeDir()

if err != nil {
Expand All @@ -24,7 +23,6 @@ func TestNewGobrewHomeDirUsesUserHomeDir(t *testing.T) {
}

func TestNewGobrewHomeDirDefaultsToHome(t *testing.T) {
t.Parallel()
var envName string

switch runtime.GOOS {
Expand All @@ -49,7 +47,6 @@ func TestNewGobrewHomeDirDefaultsToHome(t *testing.T) {
}

func TestNewGobrewHomeDirUsesGoBrewRoot(t *testing.T) {
t.Parallel()
oldEnvValue := os.Getenv("GOBREW_ROOT")
defer func() {
_ = os.Setenv("GOBREW_ROOT", oldEnvValue)
Expand All @@ -63,7 +60,6 @@ func TestNewGobrewHomeDirUsesGoBrewRoot(t *testing.T) {
}

func TestJudgeVersion(t *testing.T) {
//t.Parallel()
tests := []struct {
version string
wantVersion string
Expand Down Expand Up @@ -107,7 +103,6 @@ func TestJudgeVersion(t *testing.T) {
for _, test := range tests {
test := test
t.Run(test.version, func(t *testing.T) {
//t.Parallel()
gb := NewGoBrew()
version := gb.judgeVersion(test.version)
assert.Equal(t, test.wantVersion, version)
Expand All @@ -117,15 +112,13 @@ func TestJudgeVersion(t *testing.T) {
}

func TestListVersions(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()
gb := NewGoBrewDirectory(tempDir)

gb.ListVersions()
}

func TestExistVersion(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()
gb := NewGoBrewDirectory(tempDir)

Expand All @@ -135,7 +128,6 @@ func TestExistVersion(t *testing.T) {
}

func TestInstallAndExistVersion(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()
gb := NewGoBrewDirectory(tempDir)
gb.Install("1.19")
Expand All @@ -144,7 +136,6 @@ func TestInstallAndExistVersion(t *testing.T) {
}

func TestUnInstallThenNotExistVersion(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()
gb := NewGoBrewDirectory(tempDir)
gb.Uninstall("1.19")
Expand All @@ -153,7 +144,6 @@ func TestUnInstallThenNotExistVersion(t *testing.T) {
}

func TestUpgrade(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()

gb := NewGoBrewDirectory(tempDir)
Expand All @@ -180,7 +170,6 @@ func TestUpgrade(t *testing.T) {
}

func TestDoNotUpgradeLatestVersion(t *testing.T) {
//t.Parallel()
t.Skip("skipping test...needs to rewrite")
tempDir := t.TempDir()

Expand Down Expand Up @@ -209,7 +198,6 @@ func TestDoNotUpgradeLatestVersion(t *testing.T) {
}

func TestInteractive(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()

gb := NewGoBrewDirectory(tempDir)
Expand Down Expand Up @@ -241,7 +229,6 @@ func TestInteractive(t *testing.T) {
}

func TestPrune(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()
gb := NewGoBrewDirectory(tempDir)
gb.Install("1.20")
Expand All @@ -253,7 +240,6 @@ func TestPrune(t *testing.T) {
}

func TestGoBrew_CurrentVersion(t *testing.T) {
t.Parallel()
tempDir := t.TempDir()
gb := NewGoBrewDirectory(tempDir)
assert.Equal(t, true, gb.CurrentVersion() == "")
Expand Down

0 comments on commit e686093

Please sign in to comment.