Skip to content

Commit 85d9fe3

Browse files
committed
Adjust overlay tests to expect "index=off"
When running tests on any modern distro, this assumption will work. If we need to make it work with kernels where we don't append this option it will require some more involved changes. Signed-off-by: Phil Estes <[email protected]>
1 parent 027ee56 commit 85d9fe3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

snapshots/overlay/overlay_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ func testOverlayOverlayMount(t *testing.T, newSnapshotter testsuite.SnapshotterF
174174
lower = "lowerdir=" + getParents(ctx, o, root, "/tmp/layer2")[0]
175175
)
176176
for i, v := range []string{
177+
"index=off",
177178
work,
178179
upper,
179180
lower,
@@ -334,12 +335,12 @@ func testOverlayView(t *testing.T, newSnapshotter testsuite.SnapshotterFunc) {
334335
if m.Source != "overlay" {
335336
t.Errorf("mount source should be overlay but received %q", m.Source)
336337
}
337-
if len(m.Options) != 1 {
338-
t.Errorf("expected 1 mount option but got %d", len(m.Options))
338+
if len(m.Options) != 2 {
339+
t.Errorf("expected 1 additional mount option but got %d", len(m.Options))
339340
}
340341
lowers := getParents(ctx, o, root, "/tmp/view2")
341342
expected = fmt.Sprintf("lowerdir=%s:%s", lowers[0], lowers[1])
342-
if m.Options[0] != expected {
343+
if m.Options[1] != expected {
343344
t.Errorf("expected option %q but received %q", expected, m.Options[0])
344345
}
345346
}

0 commit comments

Comments
 (0)