You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-03 00:57:43 +02:00
test: improve file not found checkings (#3831)
using `errors.Is` everywhere, as file not found errors have different messages on different OSes.
This commit is contained in:
committed by
GitHub
parent
29335c84a4
commit
82144cb2c0
@ -758,9 +758,9 @@ func TestRunPipeWithoutMainFunc(t *testing.T) {
|
||||
t.Run("not main.go", func(t *testing.T) {
|
||||
ctx := newCtx(t)
|
||||
ctx.Config.Builds[0].Main = "foo.go"
|
||||
require.EqualError(t, Default.Build(ctx, ctx.Config.Builds[0], api.Options{
|
||||
require.ErrorIs(t, Default.Build(ctx, ctx.Config.Builds[0], api.Options{
|
||||
Target: runtimeTarget,
|
||||
}), `couldn't find main file: stat foo.go: no such file or directory`)
|
||||
}), os.ErrNotExist)
|
||||
})
|
||||
t.Run("glob", func(t *testing.T) {
|
||||
ctx := newCtx(t)
|
||||
|
Reference in New Issue
Block a user