datasourcee2e

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package datasourcee2e provides reusable real-Postgres data-source E2E setup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertStoredCredentialHasPayload

func AssertStoredCredentialHasPayload(t testing.TB, pool *pgxpool.Pool, org, credential slug.Slug, status string)

func AssertStoredCredentialState

func AssertStoredCredentialState(t testing.TB, pool *pgxpool.Pool, org, credential slug.Slug, status string, length int)

func NewPostgresCredentialUpdateParams

func NewPostgresCredentialUpdateParams() *datasourcessvc.UpdateCredentialsParams

func NewPostgresDataSourceParams

func NewPostgresDataSourceParams(source slug.Slug, name string) *datasourcessvc.CreateParams

func SeedOrganization

func SeedOrganization(t testing.TB, pool *pgxpool.Pool, org slug.Slug)

func StoredDataSourceCredentialSlug

func StoredDataSourceCredentialSlug(t testing.TB, pool *pgxpool.Pool, org, source slug.Slug) slug.Slug

func UniqueSlug

func UniqueSlug(t testing.TB, prefix string) slug.Slug

Types

type ConnectionTestExecutorFunc

type ConnectionTestExecutorFunc func(context.Context, datasourcessvc.ConnectionTestRequest) error

func (ConnectionTestExecutorFunc) TestConnection

type GitHubAppsStub

type GitHubAppsStub struct {
	Organization slug.Slug
	Connection   *githubappsvc.Connection
}

func (GitHubAppsStub) Get

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

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

func NewStack

func NewStack(t testing.TB, pool *pgxpool.Pool, registries ...credentialssvc.ProviderRegistry) *Stack

func (*Stack) FindDataSource

func (s *Stack) FindDataSource(t testing.TB, org, source slug.Slug) *repods.DataSource

func (*Stack) Service

func (*Stack) ServiceWithConfig

func (s *Stack) ServiceWithConfig(t testing.TB, c ServiceConfig) datasourcessvc.Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL