1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
goreleaser/internal/linux/arch_test.go
Carlos Alexandro Becker 979f8632b7
refactor: use require on all tests (#1839)
* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: use require on all tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-06 12:48:04 +00:00

27 lines
515 B
Go

package linux
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
func TestArch(t *testing.T) {
for from, to := range map[string]string{
"linuxamd64": "amd64",
"linux386": "i386",
"linuxarm64": "arm64",
"linuxarm5": "armel",
"linuxarm6": "armhf",
"linuxarm7": "armhf",
"linuxppc64": "ppc64",
"linuxppc64le": "ppc64le",
"linuxwhat": "what",
} {
t.Run(fmt.Sprintf("%s to %s", from, to), func(t *testing.T) {
require.Equal(t, to, Arch(from))
})
}
}