mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-15 11:56:56 +02:00
add: more scoop unit tests
This commit is contained in:
parent
98433ca412
commit
12501bdfff
@ -11,9 +11,47 @@ import (
|
|||||||
"github.com/goreleaser/goreleaser/context"
|
"github.com/goreleaser/goreleaser/context"
|
||||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||||
"github.com/goreleaser/goreleaser/internal/client"
|
"github.com/goreleaser/goreleaser/internal/client"
|
||||||
|
"github.com/goreleaser/goreleaser/internal/testlib"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestDescription(t *testing.T) {
|
||||||
|
assert.NotEmpty(t, Pipe{}.String())
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestDefault(t *testing.T) {
|
||||||
|
_, back := testlib.Mktmp(t)
|
||||||
|
defer back()
|
||||||
|
|
||||||
|
var ctx = &context.Context{
|
||||||
|
Config: config.Project{
|
||||||
|
Builds: []config.Build{
|
||||||
|
{
|
||||||
|
Binary: "foo",
|
||||||
|
Goos: []string{"linux", "darwin"},
|
||||||
|
Goarch: []string{"386", "amd64"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Binary: "bar",
|
||||||
|
Goos: []string{"linux", "darwin"},
|
||||||
|
Goarch: []string{"386", "amd64"},
|
||||||
|
Ignore: []config.IgnoredBuild{
|
||||||
|
{Goos: "darwin", Goarch: "amd64"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Binary: "foobar",
|
||||||
|
Goos: []string{"linux"},
|
||||||
|
Goarch: []string{"amd64"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
assert.NoError(t, Pipe{}.Default(ctx))
|
||||||
|
assert.NotEmpty(t, ctx.Config.Scoop.CommitAuthor.Name)
|
||||||
|
assert.NotEmpty(t, ctx.Config.Scoop.CommitAuthor.Email)
|
||||||
|
}
|
||||||
|
|
||||||
func Test_buildManifest(t *testing.T) {
|
func Test_buildManifest(t *testing.T) {
|
||||||
type args struct {
|
type args struct {
|
||||||
ctx *context.Context
|
ctx *context.Context
|
||||||
|
Loading…
x
Reference in New Issue
Block a user