testwithdb

package
v0.0.0-...-a57a29f Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2016 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBDriver string

DBDriver is exported for testing purpose

Functions

func AuthentifyRequest

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

AuthentifyRequest 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, error)

InsertAdminUser have to be used only for tests

func InsertTestProject

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

InsertTestProject create a test project

func RandomString

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

RandomString have to be used only for tests

func SetupPG

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

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