Documentation ¶
Index ¶
- Variables
- func AmplifierConnection() (*grpc.ClientConn, error)
- type Helper
- func (h *Helper) Accounts() account.AccountClient
- func (h *Helper) AddUserToTeam(ownerCtx context.Context, t *testing.T, team *account.CreateTeamRequest, ...)
- func (h *Helper) CreateAndAddUserToOrganization(ownerCtx context.Context, t *testing.T, org *account.CreateOrganizationRequest, ...) context.Context
- func (h *Helper) CreateOrganization(t *testing.T, org *account.CreateOrganizationRequest, ...) context.Context
- func (h *Helper) CreateTeam(t *testing.T, org *account.CreateOrganizationRequest, ...) context.Context
- func (h *Helper) CreateUser(t *testing.T, user *account.SignUpRequest) context.Context
- func (h *Helper) DefaultOrg() account.CreateOrganizationRequest
- func (h *Helper) DeployStack(ctx context.Context, name string, composeFile string) (string, error)
- func (h *Helper) Login() (metadata.MD, error)
- func (h *Helper) Logs() logs.LogsClient
- func (h *Helper) RandomOrg() account.CreateOrganizationRequest
- func (h *Helper) RandomTeam(org string) account.CreateTeamRequest
- func (h *Helper) RandomUser() account.SignUpRequest
- func (h *Helper) RemoveUserFromTeam(ownerCtx context.Context, t *testing.T, team *account.CreateTeamRequest, ...)
- func (h *Helper) Resources() resource.ResourceClient
- func (h *Helper) Stacks() stack.StackClient
- func (h *Helper) SuperLogin() (context.Context, error)
- func (h *Helper) SuperUser() account.SignUpRequest
- func (h *Helper) Switch(userCtx context.Context, t *testing.T, accountName string) context.Context
- func (h *Helper) Tokens() *auth.Tokens
- type LogProducer
Constants ¶
This section is empty.
Variables ¶
var ( TestMessage = "test message " TestContainerID = stringid.GenerateNonCryptoID() TestContainerName = "testcontainer" TestContainerShortName = "testcontainershortname" TestContainerState = "testcontainerstate" TestServiceID = stringid.GenerateNonCryptoID() TestServiceName = "testservice" TestStackID = stringid.GenerateNonCryptoID() TestStackName = "teststack" TestNodeID = stringid.GenerateNonCryptoID() TestTaskID = stringid.GenerateNonCryptoID() )
Log Producer constants
Functions ¶
func AmplifierConnection ¶
func AmplifierConnection() (*grpc.ClientConn, error)
AmplifierConnection returns a grpc connection to amplifier
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper is a test helper
func (*Helper) Accounts ¶
func (h *Helper) Accounts() account.AccountClient
Accounts returns an account client
func (*Helper) AddUserToTeam ¶
func (h *Helper) AddUserToTeam(ownerCtx context.Context, t *testing.T, team *account.CreateTeamRequest, user *account.SignUpRequest)
func (*Helper) CreateAndAddUserToOrganization ¶
func (h *Helper) CreateAndAddUserToOrganization(ownerCtx context.Context, t *testing.T, org *account.CreateOrganizationRequest, user *account.SignUpRequest) context.Context
CreateAndAddUserToOrganization signs up and logs in the given user and adds them to the given organization
func (*Helper) CreateOrganization ¶
func (h *Helper) CreateOrganization(t *testing.T, org *account.CreateOrganizationRequest, owner *account.SignUpRequest) context.Context
CreateOrganization signs up and logs in the given user and creates an organization
func (*Helper) CreateTeam ¶
func (h *Helper) CreateTeam(t *testing.T, org *account.CreateOrganizationRequest, owner *account.SignUpRequest, team *account.CreateTeamRequest) context.Context
CreateTeam creates the given owner, creates the given organization and creates a team in this organization
func (*Helper) CreateUser ¶
CreateUser signs up and logs in the given user
func (*Helper) DefaultOrg ¶ added in v0.15.0
func (h *Helper) DefaultOrg() account.CreateOrganizationRequest
DefaultOrg returns the default organization CreateOrganizationRequest
func (*Helper) DeployStack ¶
DeployStack deploys a stack with given name and file location
func (*Helper) Login ¶
Login sign-up, verify and log-in a random user and returns the associated credentials
func (*Helper) RandomOrg ¶
func (h *Helper) RandomOrg() account.CreateOrganizationRequest
RandomOrg returns a random organization CreateOrganizationRequest
func (*Helper) RandomTeam ¶
func (h *Helper) RandomTeam(org string) account.CreateTeamRequest
RandomTeam returns a random team CreateTeamRequest
func (*Helper) RandomUser ¶
func (h *Helper) RandomUser() account.SignUpRequest
RandomUser returns a random user SignUpRequest
func (*Helper) RemoveUserFromTeam ¶
func (h *Helper) RemoveUserFromTeam(ownerCtx context.Context, t *testing.T, team *account.CreateTeamRequest, user *account.SignUpRequest)
func (*Helper) Resources ¶
func (h *Helper) Resources() resource.ResourceClient
Resources returns a resource client
func (*Helper) SuperLogin ¶
SuperLogin logs in as super user and returns the associated credentials
func (*Helper) SuperUser ¶
func (h *Helper) SuperUser() account.SignUpRequest
SuperUser returns the super user SignUpRequest
type LogProducer ¶
type LogProducer struct {
// contains filtered or unexported fields
}
LogProducer is a test log producer
func NewLogProducer ¶
func NewLogProducer(h *Helper) *LogProducer
NewLogProducer instantiates a new log producer
func (*LogProducer) PopulateLogs ¶
func (lp *LogProducer) PopulateLogs() error
PopulateLogs populate elasticsearch with log entries, by producing test messages and making sure their got indexed
func (*LogProducer) StartAsyncProducer ¶
func (lp *LogProducer) StartAsyncProducer()
StartAsyncProducer starts producing log messages in the background
func (*LogProducer) StopAsyncProducer ¶
func (lp *LogProducer) StopAsyncProducer()
StopAsyncProducer stops producing log messages in the background