Skip to content

Commit 8c16734

Browse files
committed
Fix tests
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent 16d358f commit 8c16734

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

pkg/session/environment.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
// working directory, git repository status, and platform information
1212
func getEnvironmentInfo(workingDir string) string {
1313
return fmt.Sprintf(`Here is useful information about the environment you are running in:
14-
<env>
15-
Working directory: %s
16-
Is directory a git repo: %s
17-
Platform: %s
18-
</env>`, workingDir, boolToYesNo(isGitRepo(workingDir)), runtime.GOOS)
14+
<env>
15+
Working directory: %s
16+
Is directory a git repo: %s
17+
Platform: %s
18+
</env>`, workingDir, boolToYesNo(isGitRepo(workingDir)), runtime.GOOS)
1919
}
2020

2121
// isGitRepo checks if the given directory is a git repository

pkg/session/environment_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func TestGetEnvironmentInfo(t *testing.T) {
5050

5151
for _, tt := range tests {
5252
t.Run(tt.name, func(t *testing.T) {
53+
t.Parallel()
5354
dir := tt.setupFunc()
5455
info := getEnvironmentInfo(dir)
5556

@@ -95,6 +96,7 @@ func TestIsGitRepo(t *testing.T) {
9596

9697
for _, tt := range tests {
9798
t.Run(tt.name, func(t *testing.T) {
99+
t.Parallel()
98100
dir := tt.setupFunc()
99101
assert.True(t, isGitRepo(dir))
100102
})
@@ -128,6 +130,7 @@ func TestIsNotGitRepo(t *testing.T) {
128130

129131
for _, tt := range tests {
130132
t.Run(tt.name, func(t *testing.T) {
133+
t.Parallel()
131134
dir := tt.setupFunc()
132135
assert.False(t, isGitRepo(dir))
133136
})

0 commit comments

Comments
 (0)