tests

package
v0.0.0-...-ede0ace Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanPersistence

func CleanPersistence(conf *configuration.Conf)

will Close persistence layer (if needed) and then remove all data within. should be used at the end of a test

func ClosePersistence

func ClosePersistence(conf *configuration.Conf)

Will Close persistence layer without deleting data. Is usefull when it is required to make some check at the end of a test with a persistence system that don't allow concurrent access (bbolt)

If this function is used, a call to #DeletePersistence may be required to clean everything before the next test

func DeleteBucket

func DeleteBucket(conf *configuration.Conf, bucketName []byte)

func DeletePersistence

func DeletePersistence(conf *configuration.Conf)

func GetToken

func GetToken(secret string, exp time.Time) string

func InsertObject

func InsertObject(conf *configuration.Conf, bucketName, key []byte, object interface{})

insert some objet inside a given bucket. Create the bucket if needed

func ObjectExist

func ObjectExist(conf *configuration.Conf, bucketName, key []byte) bool

Types

type MockRepository

type MockRepository struct {
	persistence.Repository
	CreateJobRunCount int
	UpdateJobRunCount int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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