Skip to content

Use codeclysm/extract and remove custom implementation #867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix cleanup in tests
  • Loading branch information
umbynos committed Dec 18, 2023
commit 970d654e09aeb19631dd8fcdd7bb3992a0f43060
9 changes: 9 additions & 0 deletions tools/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package tools

import (
"encoding/json"
"runtime"
"testing"
"time"

Expand All @@ -40,6 +41,10 @@ func TestDownloadCorrectPlatform(t *testing.T) {
{"windows", "amd64", "x86_64-mingw32"},
{"linux", "arm", "arm-linux-gnueabihf"},
}
defer func() {
OS = runtime.GOOS // restore `runtime.OS`
Arch = runtime.GOARCH // restore `runtime.ARCH`
}()
testIndex := paths.New("testdata", "test_tool_index.json")
buf, err := testIndex.ReadFile()
require.NoError(t, err)
Expand Down Expand Up @@ -72,6 +77,10 @@ func TestDownloadFallbackPlatform(t *testing.T) {
{"darwin", "arm64", "i386-apple-darwin11"},
{"windows", "amd64", "i686-mingw32"},
}
defer func() {
OS = runtime.GOOS // restore `runtime.OS`
Arch = runtime.GOARCH // restore `runtime.ARCH`
}()
testIndex := paths.New("testdata", "test_tool_index.json")
buf, err := testIndex.ReadFile()
require.NoError(t, err)
Expand Down