Skip to content

Commit 98f2fb4

Browse files
committed
fix fuse test issues
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 310a88e commit 98f2fb4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

integration/metrics_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,14 @@ log_fuse_operations = true
153153

154154
manipulateZtocMetadata := func(zt *ztoc.Ztoc) {
155155
for i, md := range zt.FileMetadata {
156-
md.UncompressedOffset += 2
157-
md.UncompressedSize = math.MaxInt64
158-
md.PAXHeaders = map[string]string{"foo": "bar"}
159-
zt.FileMetadata[i] = md
156+
// Setting UncompressedSize high triggers a "value too large" error
157+
// Maniulate regular files to alter ztoc data and trigger fuse ops failure.
158+
if md.Type == "reg" {
159+
md.UncompressedOffset += 2
160+
md.UncompressedSize = math.MaxInt64
161+
md.PAXHeaders = map[string]string{"foo": "bar"}
162+
zt.FileMetadata[i] = md
163+
}
160164
}
161165
}
162166

integration/pull_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func TestLazyPullWithSparseIndex(t *testing.T) {
236236
}
237237

238238
func checkFuseMounts(t *testing.T, sh *shell.Shell, remoteSnapshotsExpectedCount int) {
239-
mounts := string(sh.O("mount"))
239+
mounts := string(sh.O("cat", "/proc/mounts"))
240240
remoteSnapshotsActualCount := strings.Count(mounts, "fuse.rawBridge")
241241
if remoteSnapshotsExpectedCount != remoteSnapshotsActualCount {
242242
t.Fatalf("incorrect number of remote snapshots; expected=%d, actual=%d",

0 commit comments

Comments
 (0)