Documentation
¶
Index ¶
- func NewPostgresPool(t *testing.T, ctx context.Context) *pgxpool.Pool
- type BaseSuite
- type BaseSuiteConfig
- type NoopProjectService
- func (n *NoopProjectService) ClientBelongsToProject(ctx context.Context, projectID string, clientID string) (bool, error)
- func (n *NoopProjectService) CreateOrUpdateProject(ctx context.Context, project types.CreateProjectForm) (projects.Project, error)
- func (n *NoopProjectService) CreateProject(ctx context.Context, name string, clients []string) (projects.Project, error)
- func (n *NoopProjectService) DeleteProject(ctx context.Context, id, confirmationName string) error
- func (n *NoopProjectService) GetProject(ctx context.Context, id string) (projects.Project, error)
- func (n *NoopProjectService) GetProjectPage(ctx context.Context, query types.GetProjectPageInput) ([]projects.Project, int64, error)
- func (n *NoopProjectService) GetProjects(ctx context.Context) ([]projects.Project, error)
- func (n *NoopProjectService) GetProjectsByIds(ctx context.Context, ids []string) ([]projects.Project, error)
- func (n *NoopProjectService) ProjectExists(ctx context.Context, projectId string, clientId string) bool
- func (n *NoopProjectService) SearchProjects(ctx context.Context, request projects.SearchProjectsRequest) ([]projects.Project, error)
- func (n *NoopProjectService) UpdateProject(ctx context.Context, id uuid.UUID, name string, clients []string) (projects.Project, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseSuite ¶
type BaseSuite struct {
suite.Suite
PostgresPool *pgxpool.Pool
// NATS
NatsContainer *nats.NATSContainer
NatsAddr string
NatsConn *natsconn.NatsConnection
// Services
NatsCredsService *serverauth.NatsCredentialService
ProjectsService projects.ProjectsService
// WebSocket
LiveLogs *live.Logs
// contains filtered or unexported fields
}
BaseSuite provides PostgreSQL and NATS for integration suites.
func (*BaseSuite) SetupSuite ¶
func (s *BaseSuite) SetupSuite()
SetupSuite starts PostgreSQL and NATS containers.
func (*BaseSuite) TearDownSuite ¶
func (s *BaseSuite) TearDownSuite()
TearDownSuite cleans up all containers
func (*BaseSuite) WithConfig ¶
func (s *BaseSuite) WithConfig(config BaseSuiteConfig)
WithConfig sets custom configuration for the suite
type BaseSuiteConfig ¶
type BaseSuiteConfig struct {
ConfigPath string
NatsAccountSeed string
NatsJwt string
NatsSeed string
}
BaseSuiteConfig holds configuration for the base test suite
func DefaultBaseSuiteConfig ¶
func DefaultBaseSuiteConfig() BaseSuiteConfig
DefaultBaseSuiteConfig returns sensible defaults
type NoopProjectService ¶
type NoopProjectService struct{}
func (*NoopProjectService) ClientBelongsToProject ¶
func (*NoopProjectService) CreateOrUpdateProject ¶
func (n *NoopProjectService) CreateOrUpdateProject(ctx context.Context, project types.CreateProjectForm) (projects.Project, error)
CreateOrUpdateProject implements projects.ProjectsService.
func (*NoopProjectService) CreateProject ¶
func (n *NoopProjectService) CreateProject(ctx context.Context, name string, clients []string) (projects.Project, error)
CreateProject implements projects.ProjectsService.
func (*NoopProjectService) DeleteProject ¶
func (n *NoopProjectService) DeleteProject(ctx context.Context, id, confirmationName string) error
DeleteProject implements projects.ProjectsService.
func (*NoopProjectService) GetProject ¶
GetProject implements projects.ProjectsService.
func (*NoopProjectService) GetProjectPage ¶
func (n *NoopProjectService) GetProjectPage(ctx context.Context, query types.GetProjectPageInput) ([]projects.Project, int64, error)
GetProjectPage implements projects.ProjectsService.
func (*NoopProjectService) GetProjects ¶
GetProjects implements projects.ProjectsService.
func (*NoopProjectService) GetProjectsByIds ¶
func (n *NoopProjectService) GetProjectsByIds(ctx context.Context, ids []string) ([]projects.Project, error)
GetProjectsByIds implements projects.ProjectsService.
func (*NoopProjectService) ProjectExists ¶
func (n *NoopProjectService) ProjectExists(ctx context.Context, projectId string, clientId string) bool
ProjectExists implements projects.ProjectsService.
func (*NoopProjectService) SearchProjects ¶
func (n *NoopProjectService) SearchProjects(ctx context.Context, request projects.SearchProjectsRequest) ([]projects.Project, error)
SearchProjects implements projects.ProjectsService.
func (*NoopProjectService) UpdateProject ¶
func (n *NoopProjectService) UpdateProject(ctx context.Context, id uuid.UUID, name string, clients []string) (projects.Project, error)
UpdateProject implements projects.ProjectsService.