File: arch_test.go

package info (click to toggle)
golang-github-coreos-stream-metadata-go 0.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 248 kB
  • sloc: makefile: 17
file content (19 lines) | stat: -rw-r--r-- 511 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// package arch contains mappings between the Golang architecture and
// the RPM architecture used by Fedora CoreOS and derivatives.
package arch

import (
	"runtime"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestMapping(t *testing.T) {
	// Validate bidirectional mapping for current architecture
	assert.Equal(t, GoArch(CurrentRpmArch()), runtime.GOARCH)

	assert.Equal(t, GoArch("x86_64"), "amd64")
	assert.Equal(t, GoArch("aarch64"), "arm64")
	assert.Equal(t, GoArch("ppc64le"), "ppc64le")
}