2018-10-05 09:22:53 -03:00
|
|
|
package publish
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/goreleaser/goreleaser/pkg/config"
|
|
|
|
"github.com/goreleaser/goreleaser/pkg/context"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestDescription(t *testing.T) {
|
2018-10-16 20:50:18 -03:00
|
|
|
require.NotEmpty(t, Pipe{}.String())
|
2018-10-05 09:22:53 -03:00
|
|
|
}
|
|
|
|
|
2018-10-12 00:29:03 -03:00
|
|
|
func TestPublish(t *testing.T) {
|
2021-04-25 14:20:49 -03:00
|
|
|
ctx := context.New(config.Project{})
|
2018-10-16 20:50:18 -03:00
|
|
|
ctx.Config.Release.Disable = true
|
2019-06-29 16:02:40 +02:00
|
|
|
ctx.TokenType = context.TokenTypeGitHub
|
2018-10-20 14:15:27 -03:00
|
|
|
for i := range ctx.Config.Dockers {
|
2019-03-06 17:17:53 +01:00
|
|
|
ctx.Config.Dockers[i].SkipPush = "true"
|
2018-10-20 14:15:27 -03:00
|
|
|
}
|
2018-10-12 00:29:03 -03:00
|
|
|
require.NoError(t, Pipe{}.Run(ctx))
|
|
|
|
}
|