Documentation ¶
Index ¶
- Variables
- func AuthHeaders(t *testing.T, u *sdk.User, pass string) http.Header
- func AuthentifyRequest(t *testing.T, req *http.Request, u *sdk.User, pass string)
- func AuthentifyRequestFromWorker(t *testing.T, req *http.Request, w *sdk.Worker)
- func DeleteTestProject(t *testing.T, db database.QueryExecuter, key string) error
- func InsertAdminUser(t *testing.T, db *sql.DB) (*sdk.User, string)
- func InsertLambaUser(t *testing.T, db database.QueryExecuter, groups ...*sdk.Group) (*sdk.User, string)
- func InsertTestProject(t *testing.T, db database.QueryExecuter, key, name string) *sdk.Project
- func NewAuthentifiedRequest(t *testing.T, u *sdk.User, pass, method, uri string, i interface{}) *http.Request
- func NewAuthentifiedRequestFromWorker(t *testing.T, w *sdk.Worker, method, uri string, i interface{}) *http.Request
- func NoError(t *testing.T, err error, msg ...interface{})
- func NotEmpty(t *testing.T, i interface{}, msg ...interface{})
- func NotNil(t *testing.T, i interface{}, msg ...interface{})
- func RandomString(t *testing.T, strlen int) string
- func SetupPG(t *testing.T, bootstrapFunc ...bootstrap) *sql.DB
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DBDriver string
)
DBDriver is exported for testing purpose
Functions ¶
func AuthentifyRequest ¶
AuthentifyRequest have to be used only for tests
func AuthentifyRequestFromWorker ¶
AuthentifyRequestFromWorker have to be used only for tests
func DeleteTestProject ¶
DeleteTestProject delete a test project
func InsertAdminUser ¶
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 ¶
InsertTestProject create a test project
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 RandomString ¶
RandomString have to be used only for tests
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.