Make all ChunkStore impls crash on Write() after Close/Ref()

I incorrectly said this was already true in a previous patch, so
make it true now!

Also, updated file_store_test.go and s3_store_test.go to use stretchr
testify suites so they can share setup and teardown code.

Fixes issue #5 as well
This commit is contained in:
Chris Masone
2015-07-10 11:30:32 -07:00
parent 96f21c4a60
commit 6c3047cf03
5 changed files with 168 additions and 169 deletions
-2
View File
@@ -65,8 +65,6 @@ func (w *memoryChunkWriter) Ref() (ref.Ref, error) {
}
func (w *memoryChunkWriter) Close() error {
// Not really necessary, but this will at least free memory and cause subsequent operations to crash.
// BUG 17: Make this method consistent with other ChunkStore implementations.
*w = memoryChunkWriter{}
return nil
}