Skip to content

Commit

Permalink
Add windows-specific test cases to findNew
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Sep 19, 2023
1 parent d64473a commit 3bb6149
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/autoupdate/findnew_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func TestGetUpdateDir(t *testing.T) {
{in: "/a/bin/Test.app/Contents/MacOS/launcher-updates/1569339163/Test.app/Contents/MacOS/launcher", out: filepath.Clean("/a/bin/launcher-updates")},
{in: "", out: ""},
{in: "/", out: ""},
{in: `C:\Program Files\Kolide\Launcher-kolide-k2\bin\osqueryd.exe`, out: `C:\Program Files\Kolide\Launcher-kolide-k2\bin\osqueryd.exe-updates`},
}

for _, tt := range tests {
Expand Down Expand Up @@ -141,6 +142,11 @@ func TestGetUpdateDir_WithEnvVar(t *testing.T) { //nolint:paralleltest
installPath: filepath.Clean("/a/Test.app/Contents/MacOS/launcher"),
out: filepath.Clean("/a/bin/launcher-updates"),
},
{
currentPath: `C:\Program Files\Kolide\Launcher-kolide-k2\bin\osqueryd.exe`,
installPath: filepath.Clean(`C:\Program Files\Kolide\Launcher-kolide-k2\bin\launcher.exe`),
out: filepath.Clean(`C:\Program Files\Kolide\Launcher-kolide-k2\bin\osqueryd.exe-updates`),
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 3bb6149

Please sign in to comment.