You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-11-06 09:09:29 +02:00
test: move test to the right package
refs c9068b4b3c
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
@@ -1411,6 +1411,28 @@ func TestWarnIfTargetsAndOtherOptionsTogether(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestInvalidGoBinaryTpl(t *testing.T) {
|
||||||
|
folder := testlib.Mktmp(t)
|
||||||
|
require.NoError(t, os.Mkdir(filepath.Join(folder, ".go"), 0o755))
|
||||||
|
writeGoodMain(t, folder)
|
||||||
|
ctx := testctx.NewWithCfg(config.Project{
|
||||||
|
Builds: []config.Build{
|
||||||
|
{
|
||||||
|
Targets: []string{runtimeTarget},
|
||||||
|
GoBinary: "{{.Foo}}",
|
||||||
|
Command: "build",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
build := ctx.Config.Builds[0]
|
||||||
|
testlib.RequireTemplateError(t, Default.Build(ctx, build, api.Options{
|
||||||
|
Target: runtimeTarget,
|
||||||
|
Name: build.Binary,
|
||||||
|
Path: filepath.Join("dist", runtimeTarget, build.Binary),
|
||||||
|
Ext: "",
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Helpers
|
// Helpers
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -570,24 +570,6 @@ func TestPipeOnBuild_hooksRunPerTarget(t *testing.T) {
|
|||||||
require.FileExists(t, filepath.Join(tmpDir, "post-hook-windows_amd64"))
|
require.FileExists(t, filepath.Join(tmpDir, "post-hook-windows_amd64"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPipeOnBuild_invalidGoBinary(t *testing.T) {
|
|
||||||
build := config.Build{
|
|
||||||
Builder: "fake",
|
|
||||||
GoBinary: "testing.v{{.XYZ}}",
|
|
||||||
Targets: []string{
|
|
||||||
"linux_amd64",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
ctx := testctx.NewWithCfg(config.Project{
|
|
||||||
Builds: []config.Build{
|
|
||||||
build,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
g := semerrgroup.New(ctx.Parallelism)
|
|
||||||
runPipeOnBuild(ctx, g, build)
|
|
||||||
testlib.RequireTemplateError(t, g.Wait())
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestPipeOnBuild_invalidBinaryTpl(t *testing.T) {
|
func TestPipeOnBuild_invalidBinaryTpl(t *testing.T) {
|
||||||
build := config.Build{
|
build := config.Build{
|
||||||
Builder: "fake",
|
Builder: "fake",
|
||||||
|
|||||||
Reference in New Issue
Block a user