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.AuthUserConsumer, string)
- func InsertLambdaUser(t *testing.T, db gorpmapper.SqlExecutorWithTx, groups ...*sdk.Group) (*sdk.AuthentifiedUser, string)
- func InsertLambdaUserInOrganization(t *testing.T, db gorpmapper.SqlExecutorWithTx, orgaName string, ...) (*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 InsertRBAcPublicProject(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 InsertTestGroupInOrganization(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string, orgaName string) *sdk.Group
- func InsertTestProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, store cache.Store, ...) *sdk.Project
- func InsertTestProjectRepository(t *testing.T, db gorpmapper.SqlExecutorWithTx, pKey string, vcsServerID string, ...) *sdk.ProjectRepository
- 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 InsertWorker(t *testing.T, ctx context.Context, db gorpmapper.SqlExecutorWithTx, ...) (*sdk.V2Worker, string)
- 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 NewAuthentifiedStringRequest(t *testing.T, _ *sdk.AuthentifiedUser, pass, method, uri string, i string) *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.AuthUserConsumer, 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 InsertLambdaUserInOrganization ¶ added in v0.53.0
func InsertLambdaUserInOrganization(t *testing.T, db gorpmapper.SqlExecutorWithTx, orgaName string, groups ...*sdk.Group) (*sdk.AuthentifiedUser, string)
InsertLambdaUserInOrganization 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 InsertRBAcPublicProject ¶ added in v0.53.0
func InsertRBAcPublicProject(t *testing.T, db gorpmapper.SqlExecutorWithTx, role string, projKey string)
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 InsertTestGroupInOrganization ¶ added in v0.53.0
func InsertTestGroupInOrganization(t *testing.T, db gorpmapper.SqlExecutorWithTx, name string, orgaName string) *sdk.Group
InsertTestGroupInOrganization 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 InsertTestProjectRepository ¶ added in v0.53.0
func InsertTestProjectRepository(t *testing.T, db gorpmapper.SqlExecutorWithTx, pKey string, vcsServerID string, name string) *sdk.ProjectRepository
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 InsertWorker ¶ added in v0.53.0
func InsertWorker(t *testing.T, ctx context.Context, db gorpmapper.SqlExecutorWithTx, hatcheryConsumer *sdk.AuthHatcheryConsumer, hatch sdk.Hatchery, workerName string, jobRun sdk.V2WorkflowRunJob) (*sdk.V2Worker, string)
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 NewAuthentifiedStringRequest ¶ added in v0.53.0
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.