Skip to content

Commit

Permalink
Fix shell tests for AppVeyor
Browse files Browse the repository at this point in the history
TestDetect is good as long as a supported shell is returned.
TestGetNameAndItsPpidOfGrandParent is now removed as we don't
necessarily control the launcher of the test.
  • Loading branch information
guillaumerose authored and praveenkumar committed Dec 4, 2020
1 parent 5c87f75 commit 190b9cc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/os/shell/shell_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestDetect(t *testing.T) {

shell, err := detect()

assert.Equal(t, "powershell", shell)
assert.Contains(t, supportedShell, shell)
assert.NoError(t, err)
}

Expand All @@ -31,11 +31,3 @@ func TestGetNameAndItsPpidOfParent(t *testing.T) {
assert.Equal(t, "go.exe", shell)
assert.NoError(t, err)
}

func TestGetNameAndItsPpidOfGrandParent(t *testing.T) {
_, shellppid, _ := getNameAndItsPpid(os.Getppid())
shell, _, err := getNameAndItsPpid(shellppid)

assert.Equal(t, "powershell.exe", shell)
assert.NoError(t, err)
}

0 comments on commit 190b9cc

Please sign in to comment.