Removing the PAX header test as it is not working

The PAX header test was making a WriteHeader call and ignoring the
error. When writing the type TypeXHeader it was causing an error
that was being silently ignored. The Go tar package cannot write
this type and produces an error when one tries to. The error reads
"cannot manually encode TypeXHeader, TypeGNULongName, or TypeGNULongLink
headers"

Signed-off-by: Matt Farina <matt@mattfarina.com>
pull/8086/head
Matt Farina 5 years ago
parent 09a1cb2ce6
commit 716c635d4e
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -59,32 +59,6 @@ func TestLoadArchiveFiles(t *testing.T) {
t.Fatalf(`got unwanted error [%#v] for tar file with pax_global_header content`, err) t.Fatalf(`got unwanted error [%#v] for tar file with pax_global_header content`, err)
} }
if len(files) != 1 {
t.Fatalf(`expected to get one file but got [%v]`, files)
}
},
},
{
name: "should ignore files with TypeXHeader type",
generate: func(w *tar.Writer) {
// simulate the presence of a `pax_header` file like you might get when
// processing a GitHub release archive.
_ = w.WriteHeader(&tar.Header{
Typeflag: tar.TypeXHeader,
Name: "pax_header",
})
// we need to have at least one file, otherwise we'll get the "no files in chart archive" error
_ = w.WriteHeader(&tar.Header{
Typeflag: tar.TypeReg,
Name: "dir/empty",
})
},
check: func(t *testing.T, files []*BufferedFile, err error) {
if err != nil {
t.Fatalf(`got unwanted error [%#v] for tar file with pax_header content`, err)
}
if len(files) != 1 { if len(files) != 1 {
t.Fatalf(`expected to get one file but got [%v]`, files) t.Fatalf(`expected to get one file but got [%v]`, files)
} }

Loading…
Cancel
Save