mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
ee17c9583d
* feat(ci): compile with go 1.19 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * test: fixing template test Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * test: improve check Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: more test and docs fixes Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * test: fix Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * test: fix * test: fix * fix: lint Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * test: docker templates Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com> * fix: godoc for RequireTemplateError
17 lines
406 B
Go
17 lines
406 B
Go
package testlib
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
// RequireTemplateError requires thqt an error happens and that it is an template error.
|
|
func RequireTemplateError(tb testing.TB, err error) {
|
|
tb.Helper()
|
|
|
|
require.Error(tb, err)
|
|
require.Contains(tb, err.Error(), "template:")
|
|
require.Regexp(tb, "bad character|map has no entry|unexpected \"}\" in operand", err.Error())
|
|
}
|