mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
860b4a8f81
Signed-off-by: Carlos Becker <caarlos0@gmail.com>
32 lines
701 B
Go
32 lines
701 B
Go
package effectiveconfig
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/goreleaser/goreleaser/internal/testlib"
|
|
"github.com/goreleaser/goreleaser/pkg/config"
|
|
"github.com/goreleaser/goreleaser/pkg/context"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestPipeDescription(t *testing.T) {
|
|
require.NotEmpty(t, Pipe{}.String())
|
|
}
|
|
|
|
func TestRun(t *testing.T) {
|
|
folder := testlib.Mktmp(t)
|
|
dist := filepath.Join(folder, "dist")
|
|
require.NoError(t, os.Mkdir(dist, 0o755))
|
|
ctx := context.New(
|
|
config.Project{
|
|
Dist: dist,
|
|
},
|
|
)
|
|
require.NoError(t, Pipe{}.Run(ctx))
|
|
bts, err := os.ReadFile(filepath.Join(dist, "config.yaml"))
|
|
require.NoError(t, err)
|
|
require.NotEmpty(t, string(bts))
|
|
}
|