2017-08-20 16:50:34 -03:00
|
|
|
package testlib
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2024-05-26 15:02:57 -03:00
|
|
|
"github.com/goreleaser/goreleaser/v2/internal/pipe"
|
2020-10-06 09:48:04 -03:00
|
|
|
"github.com/stretchr/testify/require"
|
2017-08-20 16:50:34 -03:00
|
|
|
)
|
|
|
|
|
2020-05-26 00:48:10 -03:00
|
|
|
// AssertSkipped asserts that a pipe was skipped.
|
2017-08-20 16:50:34 -03:00
|
|
|
func AssertSkipped(t *testing.T, err error) {
|
2020-12-29 15:40:21 +00:00
|
|
|
t.Helper()
|
2023-12-17 15:34:28 -03:00
|
|
|
require.ErrorAs(t, err, &pipe.ErrSkip{}, "expected a pipe.ErrSkip but got %v", err)
|
2017-08-20 16:50:34 -03:00
|
|
|
}
|