Skip to content

Commit 94b6bb0

Browse files
committed
TestOverlayTarUntar: remove intermediate var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 0b55700 commit 94b6bb0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

archive_linux_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,9 @@ func TestOverlayTarUntar(t *testing.T) {
103103
assert.NilError(t, err)
104104
defer os.RemoveAll(dst)
105105

106-
options := &TarOptions{
106+
reader, err := TarWithOptions(src, &TarOptions{
107107
WhiteoutFormat: OverlayWhiteoutFormat,
108-
}
109-
reader, err := TarWithOptions(src, options)
108+
})
110109
assert.NilError(t, err)
111110
archive, err := io.ReadAll(reader)
112111
reader.Close()
@@ -138,7 +137,9 @@ func TestOverlayTarUntar(t *testing.T) {
138137
"d3/" + WhiteoutPrefix + "f1": {},
139138
})
140139

141-
err = Untar(bytes.NewReader(archive), dst, options)
140+
err = Untar(bytes.NewReader(archive), dst, &TarOptions{
141+
WhiteoutFormat: OverlayWhiteoutFormat,
142+
})
142143
assert.NilError(t, err)
143144

144145
checkFileMode(t, filepath.Join(dst, "d1"), 0o700|os.ModeDir)

0 commit comments

Comments
 (0)