Skip to content

Commit

Permalink
Apply style review feedback (part 2) (bazelbuild#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
fweikert authored Apr 6, 2021
1 parent b04a338 commit d241a55
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bazelisk_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import (
"github.com/bazelbuild/bazelisk/versions"
)

const (
rollingReleaseIdentifier = "rolling"
)

var (
transport = &fakeTransport{responses: make(map[string]*http.Response)}
tmpDir = ""
Expand Down Expand Up @@ -216,15 +220,15 @@ func TestResolveLatestRollingRelease(t *testing.T) {
gh := repositories.CreateGitHubRepo("test_token")
repos := core.CreateRepositories(nil, nil, nil, nil, gh, false)

version, _, err := repos.ResolveVersion(tmpDir, "", "rolling")
version, _, err := repos.ResolveVersion(tmpDir, "", rollingReleaseIdentifier)

if err != nil {
t.Fatalf("ResolveVersion(%q, \"\", \"rolling\"): expected no error, but got %v", tmpDir, err)
t.Fatalf("ResolveVersion(%q, \"\", %q): expected no error, but got %v", tmpDir, rollingReleaseIdentifier, err)
}

want := "5.0.0-pre.20210322.4"
if version != want {
t.Fatalf("ResolveVersion(%q, \"\", \"rolling\") = %v, but expected %v", tmpDir, version, want)
t.Fatalf("ResolveVersion(%q, \"\", %q) = %v, but expected %v", tmpDir, rollingReleaseIdentifier, version, want)
}
}

Expand Down

0 comments on commit d241a55

Please sign in to comment.