KubFly SDK for Go / bucket/buckettest
package buckettest
import "kubfly.io/sdk/bucket/buckettest"
Package buckettest is the contract of every bucket — the StoreContract of the tests of the Java SDK: a kind passes it with an empty bucket per test.
Functions
func Keys
func Keys(t testing.TB, objects func(yield func(bucket.Obj, error) bool)) []string
Keys are the keys of a listing; a failure fails the test.
func Run
func Run(t *testing.T, open func(t *testing.T) bucket.Bucket)
Run runs the contract: every subtest gets an empty bucket of its own from open and closes it.