Skip to content

Commit 798b0a3

Browse files
committed
chore: skip arm64
1 parent 9410ac1 commit 798b0a3

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

internal/cache/cache_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cache
22

33
import (
44
"fmt"
5+
"runtime"
56
"testing"
67

78
"github.com/stretchr/testify/assert"
@@ -86,6 +87,8 @@ func TestCache_Get_missing_data(t *testing.T) {
8687
}
8788

8889
func TestCache_buildKey(t *testing.T) {
90+
skipNotAmd64(t)
91+
8992
pkgCache := setupCache(t)
9093

9194
pkg := fakePackage()
@@ -97,6 +100,10 @@ func TestCache_buildKey(t *testing.T) {
97100
}
98101

99102
func TestCache_pkgActionID(t *testing.T) {
103+
if runtime.GOARCH != "amd64" {
104+
t.Skip("skipping test because cache values change on arm64")
105+
}
106+
100107
pkgCache := setupCache(t)
101108

102109
pkg := fakePackage()
@@ -108,6 +115,8 @@ func TestCache_pkgActionID(t *testing.T) {
108115
}
109116

110117
func TestCache_packageHash_load(t *testing.T) {
118+
skipNotAmd64(t)
119+
111120
pkgCache := setupCache(t)
112121

113122
pkg := fakePackage()
@@ -121,6 +130,8 @@ func TestCache_packageHash_load(t *testing.T) {
121130
}
122131

123132
func TestCache_packageHash_store(t *testing.T) {
133+
skipNotAmd64(t)
134+
124135
pkgCache := setupCache(t)
125136

126137
pkg := fakePackage()
@@ -143,6 +154,8 @@ func TestCache_packageHash_store(t *testing.T) {
143154
}
144155

145156
func TestCache_computeHash(t *testing.T) {
157+
skipNotAmd64(t)
158+
146159
pkgCache := setupCache(t)
147160

148161
pkg := fakePackage()
@@ -156,3 +169,11 @@ func TestCache_computeHash(t *testing.T) {
156169
assert.Equal(t, "f1288ac9e75477e1ed42c06ba7d78213ed3cc52799c01a4f695bc54cd4e8a698", results[HashModeNeedDirectDeps])
157170
assert.Equal(t, "11d5b95830a3d86ad6dcac15b0adb46f686a30f1633cc1b74f7133d093da7979", results[HashModeNeedAllDeps])
158171
}
172+
173+
func skipNotAmd64(t *testing.T) {
174+
t.Helper()
175+
176+
if runtime.GOARCH != "amd64" {
177+
t.Skip("skipping test because cache values change on arm64")
178+
}
179+
}

0 commit comments

Comments
 (0)