test

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package test provides generic tests of the leakybucket interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddResetTest

func AddResetTest(s leakybucket.Storage) func(*testing.T)

AddResetTest returns a test that Add performs properly across reset time boundaries. It is meant to be used by leakybucket implementers who wish to test this.

func AddTest

func AddTest(s leakybucket.Storage) func(*testing.T)

AddTest returns a test that adding to a single bucket works. It is meant to be used by leakybucket implementers who wish to test this.

func BucketInstanceConsistencyTest

func BucketInstanceConsistencyTest(s leakybucket.Storage) func(*testing.T)

BucketInstanceConsistencyTest returns a test that two instances of a leakybucket pointing to the same remote bucket keep consistent state with the remote.

func CreateTest

func CreateTest(s leakybucket.Storage) func(*testing.T)

CreateTest returns a test of bucket creation for a given storage backend. It is meant to be used by leakybucket implementers who wish to test this.

func FindOrCreateTest

func FindOrCreateTest(s leakybucket.Storage) func(*testing.T)

FindOrCreateTest returns a test that the Create function is essentially a FindOrCreate: if you create one bucket, wait some time, and create another bucket with the same name, all the properties should be the same. It is meant to be used by leakybucket implementers who wish to test this.

func ThreadSafeAddTest

func ThreadSafeAddTest(s leakybucket.Storage) func(*testing.T)

ThreadSafeAddTest returns a test that adding to a single bucket is thread-safe. It is meant to be used by leakybucket implementers who wish to test this.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL