mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
scripts/build/release_publisher/publisher_test.go: Fix trivial megacheck warning.
See,
$ gometalinter --vendor --deadline 6m --disable-all --enable=megacheck ./...
scripts/build/release_publisher/publisher_test.go:14:2⚠️ should merge variable declaration with assignment on next line (S1021) (megacheck)
This commit is contained in:
parent
0e7b6dcfb4
commit
960651e510
@ -3,19 +3,20 @@ package main
|
|||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
func TestPreparingReleaseFromRemote(t *testing.T) {
|
func TestPreparingReleaseFromRemote(t *testing.T) {
|
||||||
|
|
||||||
|
var builder releaseBuilder
|
||||||
|
|
||||||
versionIn := "v5.2.0-beta1"
|
versionIn := "v5.2.0-beta1"
|
||||||
expectedVersion := "5.2.0-beta1"
|
expectedVersion := "5.2.0-beta1"
|
||||||
whatsNewUrl := "https://whatsnews.foo/"
|
whatsNewUrl := "https://whatsnews.foo/"
|
||||||
relNotesUrl := "https://relnotes.foo/"
|
relNotesUrl := "https://relnotes.foo/"
|
||||||
expectedArch := "amd64"
|
expectedArch := "amd64"
|
||||||
expectedOs := "linux"
|
expectedOs := "linux"
|
||||||
buildArtifacts := []buildArtifact{{expectedOs,expectedArch, ".linux-amd64.tar.gz"}}
|
buildArtifacts := []buildArtifact{{expectedOs, expectedArch, ".linux-amd64.tar.gz"}}
|
||||||
|
|
||||||
var builder releaseBuilder
|
|
||||||
|
|
||||||
builder = releaseFromExternalContent{
|
builder = releaseFromExternalContent{
|
||||||
getter: mockHttpGetter{},
|
getter: mockHttpGetter{},
|
||||||
rawVersion: versionIn,
|
rawVersion: versionIn,
|
||||||
artifactConfigurations: buildArtifactConfigurations,
|
artifactConfigurations: buildArtifactConfigurations,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +51,6 @@ func (mockHttpGetter) getContents(url string) (string, error) {
|
|||||||
return url, nil
|
return url, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestPreparingReleaseFromLocal(t *testing.T) {
|
func TestPreparingReleaseFromLocal(t *testing.T) {
|
||||||
whatsNewUrl := "https://whatsnews.foo/"
|
whatsNewUrl := "https://whatsnews.foo/"
|
||||||
relNotesUrl := "https://relnotes.foo/"
|
relNotesUrl := "https://relnotes.foo/"
|
||||||
@ -60,7 +60,7 @@ func TestPreparingReleaseFromLocal(t *testing.T) {
|
|||||||
var builder releaseBuilder
|
var builder releaseBuilder
|
||||||
testDataPath := "testdata"
|
testDataPath := "testdata"
|
||||||
builder = releaseLocalSources{
|
builder = releaseLocalSources{
|
||||||
path: testDataPath,
|
path: testDataPath,
|
||||||
artifactConfigurations: buildArtifactConfigurations,
|
artifactConfigurations: buildArtifactConfigurations,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ func TestPreparingReleaseFromLocal(t *testing.T) {
|
|||||||
expectedOs := "win"
|
expectedOs := "win"
|
||||||
|
|
||||||
builder = releaseLocalSources{
|
builder = releaseLocalSources{
|
||||||
path: testDataPath,
|
path: testDataPath,
|
||||||
artifactConfigurations: []buildArtifact{{
|
artifactConfigurations: []buildArtifact{{
|
||||||
os: expectedOs,
|
os: expectedOs,
|
||||||
arch: expectedArch,
|
arch: expectedArch,
|
||||||
|
Loading…
Reference in New Issue
Block a user