Documentation
¶
Index ¶
- func AuthentifyRequest(t *testing.T, req *http.Request, _ *sdk.AuthentifiedUser, jwt string)
- func DeleteAdmins(t *testing.T, db gorp.SqlExecutor)
- func DeleteConsumers(t *testing.T, db gorp.SqlExecutor)
- func DeleteTestGroup(t *testing.T, db gorp.SqlExecutor, g *sdk.Group)
- func DeleteTestProject(t *testing.T, db gorp.SqlExecutor, store cache.Store, key string) error
- func GetBuiltinOrPluginActionByName(t *testing.T, db gorp.SqlExecutor, name string) *sdk.Action
- func InitCDNService(t *testing.T, db gorpmapper.SqlExecutorWithTx, scopes ...sdk.AuthConsumerScope) (*sdk.Service, *rsa.PrivateKey, string)
- func InsertAdminUser(t *testing.T, db gorpmapper.SqlExecutorWithTx) (*sdk.AuthentifiedUser, string)
- func InsertGroup(t *testing.T, db gorpmapper.SqlExecutorWithTx) *sdk.Group
- func InsertHatchery(t *testing.T, db gorpmapper.SqlExecutorWithTx, grp sdk.Group) (*sdk.Service, *rsa.PrivateKey, *sdk.AuthConsumer, string)
- func InsertLambdaUser(t *testing.T, db gorpmapper.SqlExecutorWithTx, groups ...*sdk.Group) (*sdk.AuthentifiedUser, string)
- func InsertMaintainerUser(t *testing.T, db gorpmapper.SqlExecutorWithTx) (*sdk.AuthentifiedUser, string)
- func InsertRBAcProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, role string, projKey string, ...)
- func InsertService(t *testing.T, db gorpmapper.SqlExecutorWithTx, name, serviceType string, ...) (*sdk.Service, *rsa.PrivateKey)
- func InsertTestGroup(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string) *sdk.Group
- func InsertTestProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, store cache.Store, ...) *sdk.Project
- func InsertTestVCSProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, projID int64, name string, ...) *sdk.VCSProject
- func InsertTestWorkflow(t *testing.T, db gorpmapper.SqlExecutorWithTx, store cache.Store, ...) *sdk.Workflow
- func InsertWorkerModel(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string, groupID int64) *sdk.Model
- func NewAction(id int64, ps ...sdk.Parameter) sdk.Action
- func NewAuthentifiedRequest(t *testing.T, _ *sdk.AuthentifiedUser, pass, method, uri string, i interface{}) *http.Request
- func NewJWTAuthentifiedMultipartRequest(t *testing.T, jwt string, method, uri string, path string, fileName string, ...) *http.Request
- func NewJWTAuthentifiedRequest(t *testing.T, jwt string, method, uri string, i interface{}) *http.Request
- func NewRequest(t *testing.T, method, uri string, i interface{}) *http.Request
- func NewUploadFileRequest(t *testing.T, method string, uri string, body io.Reader, ...) *http.Request
- func NewXSRFJWTAuthentifiedRequest(t *testing.T, jwt, xsrf string, method, uri string, i interface{}) *http.Request
- func SetUserGroupAdmin(t *testing.T, db gorpmapper.SqlExecutorWithTx, groupID int64, userID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthentifyRequest ¶
AuthentifyRequest have to be used only for tests
func DeleteAdmins ¶
func DeleteAdmins(t *testing.T, db gorp.SqlExecutor)
DeleteAdmins delete all cds admins from database.
func DeleteConsumers ¶
func DeleteConsumers(t *testing.T, db gorp.SqlExecutor)
DeleteConsumers delete all cds consumers from database.
func DeleteTestGroup ¶
DeleteTestGroup delete a test group.
func DeleteTestProject ¶
DeleteTestProject delete a test project
func GetBuiltinOrPluginActionByName ¶
GetBuiltinOrPluginActionByName returns a builtin or plugin action for given name if exists.
func InitCDNService ¶
func InitCDNService(t *testing.T, db gorpmapper.SqlExecutorWithTx, scopes ...sdk.AuthConsumerScope) (*sdk.Service, *rsa.PrivateKey, string)
func InsertAdminUser ¶
func InsertAdminUser(t *testing.T, db gorpmapper.SqlExecutorWithTx) (*sdk.AuthentifiedUser, string)
InsertAdminUser have to be used only for tests.
func InsertGroup ¶
func InsertGroup(t *testing.T, db gorpmapper.SqlExecutorWithTx) *sdk.Group
func InsertHatchery ¶
func InsertHatchery(t *testing.T, db gorpmapper.SqlExecutorWithTx, grp sdk.Group) (*sdk.Service, *rsa.PrivateKey, *sdk.AuthConsumer, string)
func InsertLambdaUser ¶
func InsertLambdaUser(t *testing.T, db gorpmapper.SqlExecutorWithTx, groups ...*sdk.Group) (*sdk.AuthentifiedUser, string)
InsertLambdaUser have to be used only for tests.
func InsertMaintainerUser ¶
func InsertMaintainerUser(t *testing.T, db gorpmapper.SqlExecutorWithTx) (*sdk.AuthentifiedUser, string)
InsertMaintainerUser have to be used only for tests.
func InsertRBAcProject ¶ added in v0.52.0
func InsertRBAcProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, role string, projKey string, user sdk.AuthentifiedUser)
func InsertService ¶
func InsertService(t *testing.T, db gorpmapper.SqlExecutorWithTx, name, serviceType string, scopes ...sdk.AuthConsumerScope) (*sdk.Service, *rsa.PrivateKey)
func InsertTestGroup ¶
func InsertTestGroup(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string) *sdk.Group
InsertTestGroup create a test group
func InsertTestProject ¶
func InsertTestProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, store cache.Store, key, name string) *sdk.Project
InsertTestProject create a test project.
func InsertTestVCSProject ¶ added in v0.52.0
func InsertTestVCSProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, projID int64, name string, vcsType string) *sdk.VCSProject
func InsertTestWorkflow ¶
func InsertWorkerModel ¶
func InsertWorkerModel(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string, groupID int64) *sdk.Model
func NewAuthentifiedRequest ¶
func NewAuthentifiedRequest(t *testing.T, _ *sdk.AuthentifiedUser, pass, method, uri string, i interface{}) *http.Request
NewAuthentifiedRequest prepare a request
func NewJWTAuthentifiedRequest ¶
func NewJWTAuthentifiedRequest(t *testing.T, jwt string, method, uri string, i interface{}) *http.Request
NewJWTAuthentifiedRequest prepare a request
func NewUploadFileRequest ¶
func NewXSRFJWTAuthentifiedRequest ¶
func NewXSRFJWTAuthentifiedRequest(t *testing.T, jwt, xsrf string, method, uri string, i interface{}) *http.Request
NewXSRFJWTAuthentifiedRequest prepare a request
func SetUserGroupAdmin ¶
func SetUserGroupAdmin(t *testing.T, db gorpmapper.SqlExecutorWithTx, groupID int64, userID string)
SetUserGroupAdmin allows a user to perform operations on given group
Types ¶
This section is empty.