mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
commit
75aef323fb
@ -7,6 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.Description())
|
||||
}
|
||||
|
||||
func TestNameWithDash(t *testing.T) {
|
||||
assert.Equal(t, formulaNameFor("some-binary"), "SomeBinary")
|
||||
}
|
||||
|
@ -6,6 +6,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.Description())
|
||||
}
|
||||
|
||||
func TestValid(t *testing.T) {
|
||||
assert.True(t, valid("windows", "386"))
|
||||
assert.True(t, valid("linux", "386"))
|
||||
|
@ -8,6 +8,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.Description())
|
||||
}
|
||||
|
||||
func TestFillBasicData(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
|
32
pipeline/env/env_test.go
vendored
Normal file
32
pipeline/env/env_test.go
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/goreleaser/goreleaser/config"
|
||||
"github.com/goreleaser/goreleaser/context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.Description())
|
||||
}
|
||||
|
||||
func TestValidEnv(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{},
|
||||
}
|
||||
assert.NoError(Pipe{}.Run(ctx))
|
||||
}
|
||||
|
||||
func TestInvalidEnv(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
os.Unsetenv("GITHUB_TOKEN")
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{},
|
||||
}
|
||||
assert.Error(Pipe{}.Run(ctx))
|
||||
}
|
25
pipeline/git/git_test.go
Normal file
25
pipeline/git/git_test.go
Normal file
@ -0,0 +1,25 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/goreleaser/goreleaser/config"
|
||||
"github.com/goreleaser/goreleaser/context"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.Description())
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
@ -7,6 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPipeDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.Description())
|
||||
}
|
||||
|
||||
func TestDescription(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
desc := description("0abf342 some message")
|
||||
|
Loading…
Reference in New Issue
Block a user