49
49
c.Assert(transport.ExchangeCount, Equals, 3)
50
50
// The first two requests are Put Block with chunks of the block data. The
51
51
// weird looking block IDs are base64 encodings of the strings "0" and "1".
52
assertBlockSent(c, context, data[:1024*1024], b64("0"), transport.Exchanges[0])
53
assertBlockSent(c, context, data[1024*1024:], b64("1"), transport.Exchanges[1])
52
assertBlockSent(c, context, data[:1024*1024], b64("000000000000000000000000000000"), transport.Exchanges[0])
53
assertBlockSent(c, context, data[1024*1024:], b64("000000000000000000000000000001"), transport.Exchanges[1])
54
54
// The second request is Put Block List to commit the block above.
55
assertBlockListSent(c, context, []string{b64("0"), b64("1")}, transport.Exchanges[2])
55
assertBlockListSent(c, context, []string{b64("000000000000000000000000000000"), b64("000000000000000000000000000001")}, transport.Exchanges[2])
58
58
func uploadRandomBlob(c *C, context *StorageContext, size int) []byte {