StorageDriver: Testsuite: call Close before getting Size
Signed-off-by: Arthur Baars <arthur@semmle.com>
This commit is contained in:
parent
c69c8a3286
commit
34891eb7ab
1 changed files with 6 additions and 6 deletions
|
@ -412,12 +412,12 @@ func (suite *DriverSuite) testContinueStreamAppend(c *check.C, chunkSize int64)
|
|||
c.Assert(err, check.IsNil)
|
||||
c.Assert(nn, check.Equals, int64(len(contentsChunk1)))
|
||||
|
||||
curSize := writer.Size()
|
||||
c.Assert(curSize, check.Equals, int64(len(contentsChunk1)))
|
||||
|
||||
err = writer.Close()
|
||||
c.Assert(err, check.IsNil)
|
||||
|
||||
curSize := writer.Size()
|
||||
c.Assert(curSize, check.Equals, int64(len(contentsChunk1)))
|
||||
|
||||
writer, err = suite.StorageDriver.Writer(suite.ctx, filename, true)
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(writer.Size(), check.Equals, curSize)
|
||||
|
@ -426,12 +426,12 @@ func (suite *DriverSuite) testContinueStreamAppend(c *check.C, chunkSize int64)
|
|||
c.Assert(err, check.IsNil)
|
||||
c.Assert(nn, check.Equals, int64(len(contentsChunk2)))
|
||||
|
||||
curSize = writer.Size()
|
||||
c.Assert(curSize, check.Equals, 2*chunkSize)
|
||||
|
||||
err = writer.Close()
|
||||
c.Assert(err, check.IsNil)
|
||||
|
||||
curSize = writer.Size()
|
||||
c.Assert(curSize, check.Equals, 2*chunkSize)
|
||||
|
||||
writer, err = suite.StorageDriver.Writer(suite.ctx, filename, true)
|
||||
c.Assert(err, check.IsNil)
|
||||
c.Assert(writer.Size(), check.Equals, curSize)
|
||||
|
|
Loading…
Reference in a new issue