Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 21dd836

Browse files
committed
fixup! internal/cmd/update.go: handle windows-specific behaviours
1 parent 24df4f7 commit 21dd836

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

internal/cmd/update_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -350,20 +350,6 @@ func Test_updater_run(t *testing.T) {
350350
})
351351

352352
if runtime.GOOS == goosWindows {
353-
run(t, "update coder - windows", func(t *testing.T, p *params) {
354-
fakeFile(t, p.Fakefs, fakeExePathWindows, 0755, fakeOldVersion)
355-
p.HTTPClient.M[apiPrivateVersionURL] = newFakeGetterResponse([]byte(fakeNewVersionJSON), 200, variadicS(), nil)
356-
p.HTTPClient.M[fakeGithubReleaseURL] = newFakeGetterResponse([]byte(fakeGithubReleaseJSON), 200, variadicS(), nil)
357-
p.HTTPClient.M[fakeAssetURLLinux] = newFakeGetterResponse(fakeValidTgzBytes, 200, variadicS(), nil)
358-
p.VersionF = func() string { return fakeOldVersion }
359-
p.ConfirmF = fakeConfirmYes
360-
p.OsF = func() string { return goosWindows }
361-
u := fromParams(p)
362-
assertFileContent(t, p.Fakefs, fakeExePathWindows, fakeOldVersion)
363-
err := u.Run(p.Ctx, false, fakeCoderURL, "")
364-
assertCLIError(t, "update coder - cannot exec new binary", err, "failed to update coder binary", fakeError.Error())
365-
assertFileContent(t, p.Fakefs, fakeExePathWindows, fakeOldVersion)
366-
})
367353
run(t, "update coder - path blocklist - windows", func(t *testing.T, p *params) {
368354
p.ExecutablePath = `C:\Windows\system32\coder.exe`
369355
u := fromParams(p)

0 commit comments

Comments
 (0)