Discover Packages
github.com/blueboardio/go-blobqueue
queuetesting
package
Version:
v0.4.5
Opens a new window with list of versions in this module.
Published: Mar 20, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func RunBenchmarkPush(b *testing .B , queue blobqueue.Queue)
func RunTests(t *testing .T , queue blobqueue.Queue, shouldAlwaysFail bool )
RunTests runs a list of predefined actions on a implementation of blobqueue.Queue.
If you're dependant of an external data storage (redis, db, etc..) and you want to test
client specific error (e.g. a wrong redis connection) you can set shouldAlwaysFail to true.
type Failing struct {
blobqueue.Queue
NextError error
}
Failing wraps a queue to mock errors returned by a blobqueue.Queue.
Empty implements Queue interface.
Len implements Queue interface.
List implements Queue interface.
Pop implements Queue interface.
Push implements Queue interface.
Shift implements Queue interface.
Unshift implements Queue interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.