mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-25 21:29:14 +02:00
added git pipeline tests
This commit is contained in:
parent
9a71fba785
commit
03bae3d4da
21
pipeline/git/git_test.go
Normal file
21
pipeline/git/git_test.go
Normal file
@ -0,0 +1,21 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/goreleaser/goreleaser/config"
|
||||
"github.com/goreleaser/goreleaser/context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestValidVersion(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{},
|
||||
}
|
||||
assert.NoError(Pipe{}.Run(ctx))
|
||||
assert.NotEmpty(ctx.Git.CurrentTag)
|
||||
assert.NotEmpty(ctx.Git.PreviousTag)
|
||||
assert.NotEmpty(ctx.Git.Diff)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user