1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/pkg/healthcheck/healthcheck_test.go
Carlos Alexandro Becker 874d698564
feat: add healthcheck cmd (#3826)
here's an idea: `goreleaser healthcheck`

It'll check if the needed dependencies (docker, git, etc) are available
in the path... this way users can preemptively run it before releasing
or to debug issues.

What do you think?

Here's how it looks like:

<img width="1007" alt="CleanShot 2023-03-02 at 23 24 26@2x"
src="https://user-images.githubusercontent.com/245435/222615682-d9cd0733-d900-43d1-9166-23b2be589b3a.png">

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-03 09:50:15 -03:00

18 lines
345 B
Go

package healthcheck
import (
"testing"
"github.com/goreleaser/goreleaser/internal/testctx"
"github.com/stretchr/testify/require"
)
func TestDependencies(t *testing.T) {
ctx := testctx.New()
require.Equal(t, []string{"git", "go"}, system{}.Dependencies(ctx))
}
func TestStringer(t *testing.T) {
require.NotEmpty(t, system{}.String())
}