mirror of
https://github.com/vbatts/tar-split.git
synced 2024-12-19 20:06:30 +00:00
Merge pull request #26 from vbatts/better_discard_in_test
tar/asm: remove unneeded Tee
This commit is contained in:
commit
026e78012b
1 changed files with 1 additions and 5 deletions
|
@ -7,7 +7,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"hash/crc64"
|
"hash/crc64"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
@ -167,10 +166,7 @@ func TestTarStream(t *testing.T) {
|
||||||
|
|
||||||
// get a sum of the stream after it has passed through to ensure it's the same.
|
// get a sum of the stream after it has passed through to ensure it's the same.
|
||||||
h0 := sha1.New()
|
h0 := sha1.New()
|
||||||
tRdr0 := io.TeeReader(tarStream, h0)
|
i, err := io.Copy(h0, tarStream)
|
||||||
|
|
||||||
// read it all to the bit bucket
|
|
||||||
i, err := io.Copy(ioutil.Discard, tRdr0)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue