(t *testing.T)
| 59 | } |
| 60 | |
| 61 | func TestReceiveCorrupt(t *testing.T) { |
| 62 | sto := new(test.Fetcher) |
| 63 | data := []byte("some blob") |
| 64 | br := blob.RefFromBytes(data) |
| 65 | data[0] = 'X' // corrupt it |
| 66 | _, err := blobserver.Receive(ctxbg, sto, br, bytes.NewReader(data)) |
| 67 | if err != blobserver.ErrCorruptBlob { |
| 68 | t.Errorf("Receive = %v; want ErrCorruptBlob", err) |
| 69 | } |
| 70 | if len(sto.BlobrefStrings()) > 0 { |
| 71 | t.Errorf("nothing should be stored. Got %q", sto.BlobrefStrings()) |
| 72 | } |
| 73 | } |
nothing calls this directly
no test coverage detected