forked from rosa/hakurei
internal/pkg: stream decompress artifact
The tarArtifact predates FileArtifact pipelining. This migrates decompression and buffering into a standalone artifact implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -293,15 +293,15 @@ func TestIdent(t *testing.T) {
|
||||
a pkg.Artifact
|
||||
want unique.Handle[pkg.ID]
|
||||
}{
|
||||
{"tar", &stubArtifact{
|
||||
pkg.KindTar,
|
||||
[]byte{pkg.TarGzip, 0, 0, 0, 0, 0, 0, 0},
|
||||
{"decompress", &stubArtifact{
|
||||
pkg.KindDecompress,
|
||||
[]byte{pkg.Gzip, 0, 0, 0, 0, 0, 0, 0},
|
||||
[]pkg.Artifact{
|
||||
overrideIdent{pkg.ID{}, new(stubArtifact)},
|
||||
},
|
||||
nil,
|
||||
}, unique.Make[pkg.ID](pkg.MustDecode(
|
||||
"WKErnjTOVbuH2P9a0gM4OcAAO4p-CoX2HQu7CbZrg8ZOzApvWoO3-ISzPw6av_rN",
|
||||
"97Y85QewssfPbNIN9cyNhzD4e6dLHcDTU8rb2c34k-aCrZfBNXFUc0duPiLFFcw_",
|
||||
))},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user