Skip to content

Commit

Permalink
fix tests concurrency for dispatch init command
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy committed Jun 26, 2024
1 parent a33b465 commit 18ac4db
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions cli/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@ func TestInitCommand(t *testing.T) {
})

t.Run("directoryExists returns true for existing directory", func(t *testing.T) {
t.Parallel()

tempDir := t.TempDir()

result, _ := directoryExists(tempDir)
assert.True(t, result)
})

t.Run("directoryExists returns false for file", func(t *testing.T) {
t.Parallel()

tempFile := t.TempDir() + "/tempfile"
_, err := os.Create(tempFile)
assert.Nil(t, err)
Expand All @@ -36,17 +32,13 @@ func TestInitCommand(t *testing.T) {
})

t.Run("isDirectoryEmpty returns true for empty directory", func(t *testing.T) {
t.Parallel()

tempDir := t.TempDir()

result, _ := isDirectoryEmpty(tempDir)
assert.True(t, result)
})

t.Run("isDirectoryEmpty returns false for non-empty directory", func(t *testing.T) {
t.Parallel()

tempDir := t.TempDir()

tempFile := tempDir + "/tempfile"
Expand All @@ -58,8 +50,6 @@ func TestInitCommand(t *testing.T) {
})

t.Run("downloadAndExtractTemplates downloads and extracts templates", func(t *testing.T) {
t.Parallel()

tempDir := t.TempDir()

err := downloadAndExtractTemplates(tempDir)
Expand All @@ -84,6 +74,4 @@ func TestInitCommand(t *testing.T) {
_, err := getLatestCommitSHA("invalidurl")
assert.NotNil(t, err)
})

// t.Run("")
}

0 comments on commit 18ac4db

Please sign in to comment.