Skip to content

Commit 9deb3f2

Browse files
authored
Merge pull request #20534 from linux-on-ibm-z/big-endian-TestCorruptedBackupFileCheck-3.6
[release-3.6] back port tests: skip TestCorruptedBackupFileCheck test on big endian platforms
2 parents ec91599 + b1de4ca commit 9deb3f2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/integration/snapshot/v3_snapshot_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package snapshot_test
1616

1717
import (
1818
"context"
19+
"encoding/binary"
1920
"fmt"
2021
"net/url"
2122
"os"
@@ -31,6 +32,7 @@ import (
3132
"go.etcd.io/etcd/client/pkg/v3/testutil"
3233
clientv3 "go.etcd.io/etcd/client/v3"
3334
"go.etcd.io/etcd/etcdutl/v3/snapshot"
35+
"go.etcd.io/etcd/pkg/v3/cpuutil"
3436
"go.etcd.io/etcd/server/v3/embed"
3537
integration2 "go.etcd.io/etcd/tests/v3/framework/integration"
3638
"go.etcd.io/etcd/tests/v3/framework/testutils"
@@ -130,6 +132,9 @@ func TestSnapshotV3RestoreMulti(t *testing.T) {
130132

131133
// TestCorruptedBackupFileCheck tests if we can correctly identify a corrupted backup file.
132134
func TestCorruptedBackupFileCheck(t *testing.T) {
135+
if cpuutil.ByteOrder() == binary.BigEndian {
136+
t.Skipf("skipping on big endian platforms since testdata/corrupted_backup.db is in little endian format")
137+
}
133138
dbPath := testutils.MustAbsPath("testdata/corrupted_backup.db")
134139
integration2.BeforeTest(t)
135140
if _, err := os.Stat(dbPath); err != nil {

0 commit comments

Comments
 (0)