From 65df7bc627d55c63e4c498a6d84148df1aa24dda Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Wed, 15 Aug 2018 21:19:38 -0400 Subject: [PATCH] make CI happy --- reflector/server_test.go | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/reflector/server_test.go b/reflector/server_test.go index d13ea2f..5a28624 100644 --- a/reflector/server_test.go +++ b/reflector/server_test.go @@ -3,7 +3,6 @@ package reflector import ( "crypto/rand" "io" - "math" "strconv" "testing" "time" @@ -168,12 +167,14 @@ func TestServer_PartialUpload(t *testing.T) { missing[i] = bits.Rand().String() } - var st store.BlobStore - st = &mockPartialStore{missing: missing} + st := store.BlobStore(&mockPartialStore{missing: missing}) if _, ok := st.(neededBlobChecker); !ok { t.Fatal("mock does not implement the relevant interface") } - st.Put(sdHash, randBlob(10)) + err = st.Put(sdHash, randBlob(10)) + if err != nil { + t.Fatal(err) + } srv := NewServer(st) err = srv.Start("127.0.0.1:" + strconv.Itoa(port)) @@ -225,15 +226,17 @@ func TestServer_PartialUpload(t *testing.T) { } } -func MakeRandStream(size int) ([]byte, [][]byte) { - blobs := make([][]byte, int(math.Ceil(float64(size)/maxBlobSize))) - for i := 0; i < len(blobs); i++ { - blobs[i] = randBlob(int(math.Min(maxBlobSize, float64(size)))) - size -= maxBlobSize - } - - return nil, blobs -} +//func MakeRandStream(size int) ([]byte, [][]byte) { +// blobs := make([][]byte, int(math.Ceil(float64(size)/maxBlobSize))) +// for i := 0; i < len(blobs); i++ { +// blobs[i] = randBlob(int(math.Min(maxBlobSize, float64(size)))) +// size -= maxBlobSize +// } +// +// //TODO: create SD blob for the stream +// +// return nil, blobs +//} func randBlob(size int) []byte { //if size > maxBlobSize {