File: 0005-fix-TestCorruptedBackupFileCheck-on-big-endian.patch

package info (click to toggle)
etcd 3.5.16-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,868 kB
  • sloc: sh: 3,136; makefile: 477
file content (21 lines) | stat: -rw-r--r-- 972 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Shengjing Zhu <zhsj@debian.org>
Date: Wed, 4 Jan 2023 19:07:15 +0800
Subject: fix TestCorruptedBackupFileCheck on big-endian

---
 tests/integration/snapshot/v3_snapshot_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/integration/snapshot/v3_snapshot_test.go b/tests/integration/snapshot/v3_snapshot_test.go
index 4de0f25..cd61cf8 100644
--- a/tests/integration/snapshot/v3_snapshot_test.go
+++ b/tests/integration/snapshot/v3_snapshot_test.go
@@ -156,7 +156,7 @@ func TestCorruptedBackupFileCheck(t *testing.T) {
 	if err == nil {
 		t.Error("expected error due to corrupted snapshot file, got no error")
 	}
-	if !strings.Contains(err.Error(), expectedErrKeywords) {
+	if !strings.Contains(err.Error(), expectedErrKeywords) && !strings.Contains(err.Error(), "invalid database") {
 		t.Errorf("expected error message to contain the following keywords:\n%s\n"+
 			"actual error message:\n%s",
 			expectedErrKeywords, err.Error())