test

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: BSD-3-Clause Imports: 24 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBDriver string

DBDriver is exported for testing purpose

Functions

func AuthHeaders

func AuthHeaders(t *testing.T, u *sdk.User, pass string) http.Header

func AuthentifyRequest

func AuthentifyRequest(t *testing.T, req *http.Request, u *sdk.User, pass string)

AuthentifyRequest have to be used only for tests

func AuthentifyRequestFromWorker

func AuthentifyRequestFromWorker(t *testing.T, req *http.Request, w *sdk.Worker)

AuthentifyRequestFromWorker have to be used only for tests

func DeleteTestProject

func DeleteTestProject(t *testing.T, db database.QueryExecuter, key string) error

DeleteTestProject delete a test project

func InsertAdminUser

func InsertAdminUser(t *testing.T, db *sql.DB) (*sdk.User, string)

InsertAdminUser have to be used only for tests

func InsertLambaUser

func InsertLambaUser(t *testing.T, db database.QueryExecuter, groups ...*sdk.Group) (*sdk.User, string)

InsertLambaUser have to be used only for tests

func InsertTestProject

func InsertTestProject(t *testing.T, db database.QueryExecuter, key, name string) *sdk.Project

InsertTestProject create a test project

func LocalAuth

func LocalAuth(t *testing.T) auth.Driver

func NewAuthentifiedRequest

func NewAuthentifiedRequest(t *testing.T, u *sdk.User, pass, method, uri string, i interface{}) *http.Request

NewAuthentifiedRequest prepare a request

func NewAuthentifiedRequestFromWorker

func NewAuthentifiedRequestFromWorker(t *testing.T, w *sdk.Worker, method, uri string, i interface{}) *http.Request

NewAuthentifiedRequestFromWorker prepare a request

func NoError

func NoError(t *testing.T, err error, msg ...interface{})

func NotEmpty

func NotEmpty(t *testing.T, i interface{}, msg ...interface{})

func NotNil

func NotNil(t *testing.T, i interface{}, msg ...interface{})

func RandomString

func RandomString(t *testing.T, strlen int) string

RandomString have to be used only for tests

func Setup

func Setup(testname string, t *testing.T) *sql.DB

Setup setup db for test

func SetupPG

func SetupPG(t *testing.T, bootstrapFunc ...bootstrap) *sql.DB

SetupPG setup PG DB for test

Types

This section is empty.

Jump to

Keyboard shortcuts

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