Documentation
¶
Overview ¶
Package datasourcee2e provides reusable real-Postgres data-source E2E setup.
Index ¶
- func AssertStoredCredentialHasPayload(t testing.TB, pool *pgxpool.Pool, org, credential slug.Slug, status string)
- func AssertStoredCredentialState(t testing.TB, pool *pgxpool.Pool, org, credential slug.Slug, status string, ...)
- func NewPostgresCredentialUpdateParams() *datasourcessvc.UpdateCredentialsParams
- func NewPostgresDataSourceParams(source slug.Slug, name string) *datasourcessvc.CreateParams
- func SeedOrganization(t testing.TB, pool *pgxpool.Pool, org slug.Slug)
- func StoredDataSourceCredentialSlug(t testing.TB, pool *pgxpool.Pool, org, source slug.Slug) slug.Slug
- func UniqueSlug(t testing.TB, prefix string) slug.Slug
- type ConnectionTestExecutorFunc
- type GitBranchExecutorFunc
- type GitHubAppsStub
- type SchemaImportProducerStub
- type ServiceConfig
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresCredentialUpdateParams ¶
func NewPostgresCredentialUpdateParams() *datasourcessvc.UpdateCredentialsParams
func NewPostgresDataSourceParams ¶
func NewPostgresDataSourceParams(source slug.Slug, name string) *datasourcessvc.CreateParams
Types ¶
type ConnectionTestExecutorFunc ¶
type ConnectionTestExecutorFunc func(context.Context, datasourcessvc.ConnectionTestRequest) error
func (ConnectionTestExecutorFunc) TestConnection ¶
func (f ConnectionTestExecutorFunc) TestConnection(ctx context.Context, r datasourcessvc.ConnectionTestRequest) error
type GitBranchExecutorFunc ¶
type GitBranchExecutorFunc func(context.Context, datasourcessvc.GitBranchRequest) ([]datasourcessvc.DataSourceBranch, error)
func (GitBranchExecutorFunc) ListGitBranches ¶
func (f GitBranchExecutorFunc) ListGitBranches(ctx context.Context, r datasourcessvc.GitBranchRequest) ([]datasourcessvc.DataSourceBranch, error)
type GitHubAppsStub ¶
type GitHubAppsStub struct {
Organization slug.Slug
Connection *githubappsvc.Connection
}
func (GitHubAppsStub) Get ¶
func (s GitHubAppsStub) Get(_ context.Context, orgSlug slug.Slug) (*githubappsvc.Connection, error)
func (GitHubAppsStub) Token ¶
func (s GitHubAppsStub) Token(_ context.Context, orgSlug slug.Slug, repositoryIDs []int64) (githubappsvc.InstallationToken, error)
type SchemaImportProducerStub ¶
type SchemaImportProducerStub struct{}
func (SchemaImportProducerStub) EnqueueDataSourceSchemaImport ¶
func (SchemaImportProducerStub) EnqueueDataSourceSchemaImport(context.Context, postgres.DBTX, jobs.DataSourceSchemaImportArgs) (queue.QueuedJob, error)
type ServiceConfig ¶
type ServiceConfig struct {
SnowflakeWIFIssuer string
ConnectionTester datasourcessvc.ConnectionTestExecutor
ConnectorFactory connector.NewConnectorFunc
DriftReports driftimpactrepo.Repository
SchemaImportProducer workerproducer.DataSourceSchemaImportProducer
GitBranchExecutor datasourcessvc.GitBranchExecutor
GitHubApps datasourcessvc.GitHubAppManager
}
type Stack ¶
type Stack struct {
Pool *pgxpool.Pool
Txm postgres.TransactionManager
Locker postgres.SessionLocker
Repo repods.Repository
SchemaRepo repods.SchemaMetadataRepository
Credentials credentialssvc.Service
Admission admissionsvc.Service
}
func NewStack ¶
func NewStack(t testing.TB, pool *pgxpool.Pool, registries ...credentialssvc.ProviderRegistry) *Stack
func (*Stack) FindDataSource ¶
func (*Stack) Service ¶
func (s *Stack) Service(t testing.TB, executor datasourcessvc.ConnectionTestExecutor) datasourcessvc.Service
func (*Stack) ServiceWithConfig ¶
func (s *Stack) ServiceWithConfig(t testing.TB, c ServiceConfig) datasourcessvc.Service
Click to show internal directories.
Click to hide internal directories.