Documentation
¶
Index ¶
- func CreateOrgProjectAndAssetAssetVersion(db core.DB) (models.Org, models.Project, models.Asset, models.AssetVersion)
- func InitDatabaseContainer(initDBSQLPath string) (core.DB, func())
- func InitSQLDatabaseContainer(initDBSQLPath string) (string, string, string, string, string, func())
- func NewContext(r *http.Request, w http.ResponseWriter) core.Context
- type TestGitlabClientFactory
- func (f TestGitlabClientFactory) FromAccessToken(accessToken string, baseURL string) (core.GitlabClientFacade, error)
- func (f TestGitlabClientFactory) FromIntegration(integration models.GitLabIntegration) (core.GitlabClientFacade, error)
- func (f TestGitlabClientFactory) FromIntegrationUUID(id uuid.UUID) (core.GitlabClientFacade, error)
- func (f TestGitlabClientFactory) FromOauth2Token(token models.GitLabOauth2Token, enableClientCache bool) (core.GitlabClientFacade, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDatabaseContainer ¶
func InitSQLDatabaseContainer ¶
func InitSQLDatabaseContainer(initDBSQLPath string) (string, string, string, string, string, func())
InitSQLDatabaseContainer initializes a test database container and returns the underlying SQL DB and connection string instead of GORM DB. Useful for components that need direct SQL access.
func NewContext ¶
Types ¶
type TestGitlabClientFactory ¶
type TestGitlabClientFactory struct {
*mocks.GitlabClientFacade
}
func NewTestClientFactory ¶
func NewTestClientFactory(t *testing.T) (TestGitlabClientFactory, *mocks.GitlabClientFacade)
func (TestGitlabClientFactory) FromAccessToken ¶
func (f TestGitlabClientFactory) FromAccessToken(accessToken string, baseURL string) (core.GitlabClientFacade, error)
func (TestGitlabClientFactory) FromIntegration ¶
func (f TestGitlabClientFactory) FromIntegration(integration models.GitLabIntegration) (core.GitlabClientFacade, error)
func (TestGitlabClientFactory) FromIntegrationUUID ¶
func (f TestGitlabClientFactory) FromIntegrationUUID(id uuid.UUID) (core.GitlabClientFacade, error)
func (TestGitlabClientFactory) FromOauth2Token ¶
func (f TestGitlabClientFactory) FromOauth2Token(token models.GitLabOauth2Token, enableClientCache bool) (core.GitlabClientFacade, error)
Click to show internal directories.
Click to hide internal directories.