Documentation ¶
Index ¶
- Variables
- func Flaky(t *testing.T)
- func GetConfig(t *testing.T) *config.Config
- func GetDbConnection(t *testing.T) *sqlx.DB
- func GetDbTx(t *testing.T) *sqlx.Tx
- func InStrings(needle string, haystack []string) bool
- func IsBraintreeProxyAvailable() bool
- func MustCreateEnvironment(t *testing.T, tx *sqlx.Tx, env *domain.Environment) *domain.Environment
- func MustCreateGitTrigger(t *testing.T, tx *sqlx.Tx, trigger *domain.GitTrigger) *domain.GitTrigger
- func MustCreateInvitation(t *testing.T, tx *sqlx.Tx, inv *domain.Invitation) *domain.Invitation
- func MustCreateJob(t *testing.T, tx *sqlx.Tx, job *domain.Job) *domain.Job
- func MustCreateOAuthToken(t *testing.T, tx *sqlx.Tx, token *domain.OAuthToken) *domain.OAuthToken
- func MustCreateOperation(t *testing.T, tx *sqlx.Tx, o *domain.Operation) *domain.Operation
- func MustCreateOrganization(t *testing.T, tx *sqlx.Tx, o *domain.Organization) *domain.Organization
- func MustCreateOrganizationMembership(t *testing.T, tx *sqlx.Tx, om *domain.OrganizationMembership) *domain.OrganizationMembership
- func MustCreateProject(t *testing.T, tx *sqlx.Tx, p *domain.Project) *domain.Project
- func MustCreateProjectMembership(t *testing.T, tx *sqlx.Tx, membership *domain.ProjectMembership) *domain.ProjectMembership
- func MustCreateRepository(t *testing.T, tx *sqlx.Tx, r *domain.Repository) *domain.Repository
- func MustCreateRepositoryCredential(t *testing.T, tx *sqlx.Tx, ss stores.SecretKeyValueStore, ...) *domain.RepositoryCredential
- func MustCreateSchedule(t *testing.T, tx *sqlx.Tx, schedule *domain.Schedule) *domain.Schedule
- func MustCreateSecret(t *testing.T, tx *sqlx.Tx, ss stores.SecretKeyValueStore, ...) *domain.Secret
- func MustCreateSession(t *testing.T, tx *sqlx.Tx, s *domain.Session) *domain.Session
- func MustCreateTask(t *testing.T, tx *sqlx.Tx, task *domain.Task) *domain.Task
- func MustCreateUser(t *testing.T, tx *sqlx.Tx, u *domain.User) *domain.User
- func MustCreateWorkspaceBaseImage(t *testing.T, tx *sqlx.Tx, wsbi *domain.WorkspaceBaseImage) *domain.WorkspaceBaseImage
- func MustSelectBillingPlan(t *testing.T, tx *sqlx.Tx, organization *domain.Organization, ...)
- type MockAuthzService
- func (s *MockAuthzService) Can(action string, thing interface{}) (bool, error)
- func (s *MockAuthzService) CanArchive(thing interface{}) (bool, error)
- func (s *MockAuthzService) CanCreate(thing interface{}) (bool, error)
- func (s *MockAuthzService) CanRead(thing interface{}) (bool, error)
- func (s *MockAuthzService) CanUpdate(thing interface{}) (bool, error)
- func (s *MockAuthzService) CapabilitiesBySubject() map[string][]string
- func (s *MockAuthzService) Expect(t *testing.T, method string, calls int)
- func (s *MockAuthzService) Log() logger.Logger
- func (s *MockAuthzService) SetLogger(l logger.Logger)
- type MockKeyValueStore
- func (self *MockKeyValueStore) Close() error
- func (self *MockKeyValueStore) Del(key string) error
- func (self *MockKeyValueStore) Exists(key string) (bool, error)
- func (self *MockKeyValueStore) Get(key string) ([]byte, error)
- func (self *MockKeyValueStore) LPush(key string, data string) error
- func (self *MockKeyValueStore) LRange(key string, start, stop int64) ([]string, error)
- func (self *MockKeyValueStore) RPush(key string, data string) error
- func (self *MockKeyValueStore) SAdd(key, member string) (int64, error)
- func (self *MockKeyValueStore) SIsMember(key, member string) (bool, error)
- func (self *MockKeyValueStore) SMembers(key string) ([]string, error)
- func (self *MockKeyValueStore) SRem(key, member string) (int64, error)
- func (self *MockKeyValueStore) Set(key string, data []byte) error
- type MockSecretKeyValueStore
- type World
- func (w *World) Environment(tag string) *domain.Environment
- func (w *World) Job(tag string) *domain.Job
- func (w *World) MustLoadDefaults(tx *sqlx.Tx, ss stores.SecretKeyValueStore, t *testing.T)
- func (w *World) Organization(tag string) *domain.Organization
- func (w *World) OrganizationMembership(tag string) *domain.OrganizationMembership
- func (w *World) Project(tag string) *domain.Project
- func (w *World) ProjectMembership(tag string) *domain.ProjectMembership
- func (w *World) Repository(tag string) *domain.Repository
- func (w *World) RepositoryCredential(tag string) *domain.RepositoryCredential
- func (w *World) Schedule(tag string) *domain.Schedule
- func (w *World) Secret(tag string) *domain.Secret
- func (w *World) Task(tag string) *domain.Task
- func (w *World) User(tag string) *domain.User
- func (w *World) WorkspaceBaseImage(tag string) *domain.WorkspaceBaseImage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TestPlan = &domain.BillingPlan{ Uuid: "c9569087-ff00-446b-b002-d29e7c3d38c0", PricePerMonth: domain.Money{Amount: 10, Currency: domain.EUR}, UsersIncluded: 1, ProjectsIncluded: 2, } )
Functions ¶
func IsBraintreeProxyAvailable ¶
func IsBraintreeProxyAvailable() bool
func MustCreateEnvironment ¶
func MustCreateEnvironment(t *testing.T, tx *sqlx.Tx, env *domain.Environment) *domain.Environment
func MustCreateGitTrigger ¶
func MustCreateGitTrigger(t *testing.T, tx *sqlx.Tx, trigger *domain.GitTrigger) *domain.GitTrigger
func MustCreateInvitation ¶
func MustCreateInvitation(t *testing.T, tx *sqlx.Tx, inv *domain.Invitation) *domain.Invitation
func MustCreateOAuthToken ¶
func MustCreateOAuthToken(t *testing.T, tx *sqlx.Tx, token *domain.OAuthToken) *domain.OAuthToken
func MustCreateOperation ¶
func MustCreateOrganization ¶
func MustCreateOrganization(t *testing.T, tx *sqlx.Tx, o *domain.Organization) *domain.Organization
func MustCreateOrganizationMembership ¶
func MustCreateOrganizationMembership(t *testing.T, tx *sqlx.Tx, om *domain.OrganizationMembership) *domain.OrganizationMembership
func MustCreateProject ¶
func MustCreateProjectMembership ¶
func MustCreateProjectMembership(t *testing.T, tx *sqlx.Tx, membership *domain.ProjectMembership) *domain.ProjectMembership
func MustCreateRepository ¶
func MustCreateRepository(t *testing.T, tx *sqlx.Tx, r *domain.Repository) *domain.Repository
func MustCreateRepositoryCredential ¶
func MustCreateRepositoryCredential(t *testing.T, tx *sqlx.Tx, ss stores.SecretKeyValueStore, rc *domain.RepositoryCredential) *domain.RepositoryCredential
func MustCreateSchedule ¶
func MustCreateSecret ¶
func MustCreateSession ¶
func MustCreateTask ¶
func MustCreateWorkspaceBaseImage ¶
func MustCreateWorkspaceBaseImage(t *testing.T, tx *sqlx.Tx, wsbi *domain.WorkspaceBaseImage) *domain.WorkspaceBaseImage
func MustSelectBillingPlan ¶
func MustSelectBillingPlan(t *testing.T, tx *sqlx.Tx, organization *domain.Organization, plan *domain.BillingPlan)
Types ¶
type MockAuthzService ¶
type MockAuthzService struct { CapabilitiesBySubjectMap map[string][]string // contains filtered or unexported fields }
func NewMockAuthzService ¶
func NewMockAuthzService() *MockAuthzService
func (*MockAuthzService) Can ¶
func (s *MockAuthzService) Can(action string, thing interface{}) (bool, error)
func (*MockAuthzService) CanArchive ¶
func (s *MockAuthzService) CanArchive(thing interface{}) (bool, error)
func (*MockAuthzService) CanCreate ¶
func (s *MockAuthzService) CanCreate(thing interface{}) (bool, error)
func (*MockAuthzService) CanRead ¶
func (s *MockAuthzService) CanRead(thing interface{}) (bool, error)
func (*MockAuthzService) CanUpdate ¶
func (s *MockAuthzService) CanUpdate(thing interface{}) (bool, error)
func (*MockAuthzService) CapabilitiesBySubject ¶
func (s *MockAuthzService) CapabilitiesBySubject() map[string][]string
func (*MockAuthzService) Expect ¶
func (s *MockAuthzService) Expect(t *testing.T, method string, calls int)
func (*MockAuthzService) Log ¶
func (s *MockAuthzService) Log() logger.Logger
func (*MockAuthzService) SetLogger ¶
func (s *MockAuthzService) SetLogger(l logger.Logger)
type MockKeyValueStore ¶
type MockKeyValueStore struct {
// contains filtered or unexported fields
}
func NewMockKeyValueStore ¶
func NewMockKeyValueStore() *MockKeyValueStore
func (*MockKeyValueStore) Close ¶
func (self *MockKeyValueStore) Close() error
func (*MockKeyValueStore) Del ¶
func (self *MockKeyValueStore) Del(key string) error
func (*MockKeyValueStore) LPush ¶
func (self *MockKeyValueStore) LPush(key string, data string) error
func (*MockKeyValueStore) LRange ¶
func (self *MockKeyValueStore) LRange(key string, start, stop int64) ([]string, error)
func (*MockKeyValueStore) RPush ¶
func (self *MockKeyValueStore) RPush(key string, data string) error
func (*MockKeyValueStore) SAdd ¶
func (self *MockKeyValueStore) SAdd(key, member string) (int64, error)
func (*MockKeyValueStore) SIsMember ¶
func (self *MockKeyValueStore) SIsMember(key, member string) (bool, error)
func (*MockKeyValueStore) SMembers ¶
func (self *MockKeyValueStore) SMembers(key string) ([]string, error)
type MockSecretKeyValueStore ¶
type MockSecretKeyValueStore struct {
// contains filtered or unexported fields
}
func NewMockSecretKeyValueStore ¶
func NewMockSecretKeyValueStore() *MockSecretKeyValueStore
func (*MockSecretKeyValueStore) Del ¶
func (self *MockSecretKeyValueStore) Del(key string) error
type World ¶
type World struct {
// contains filtered or unexported fields
}
func MustNewWorld ¶
Use this if you don't care for the stores.KeyValueStore
func (*World) Environment ¶
func (w *World) Environment(tag string) *domain.Environment
func (*World) MustLoadDefaults ¶
func (*World) Organization ¶
func (w *World) Organization(tag string) *domain.Organization
func (*World) OrganizationMembership ¶
func (w *World) OrganizationMembership(tag string) *domain.OrganizationMembership
func (*World) ProjectMembership ¶
func (w *World) ProjectMembership(tag string) *domain.ProjectMembership
func (*World) Repository ¶
func (w *World) Repository(tag string) *domain.Repository
func (*World) RepositoryCredential ¶
func (w *World) RepositoryCredential(tag string) *domain.RepositoryCredential
func (*World) WorkspaceBaseImage ¶
func (w *World) WorkspaceBaseImage(tag string) *domain.WorkspaceBaseImage
Click to show internal directories.
Click to hide internal directories.