testhelper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: AGPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoogleSheetsPayload = `` /* 524-byte string literal not displayed */

	AsyncWhPayload = `` /* 174-byte string literal not displayed */

	PendingEventsPayload = `{
		"source_id": "%s",
		"job_run_id": "%s"
	}`
	IdentifyPayload = `` /* 199-byte string literal not displayed */

	TrackPayload = `` /* 236-byte string literal not displayed */

	PagePayload = `` /* 179-byte string literal not displayed */

	ScreenPayload = `` /* 136-byte string literal not displayed */

	AliasPayload = `{
	  "userId": "%s",
	  "messageId": "%s",
	  "type": "alias",
	  "previousId": "name@surname.com"
	}`
	GroupPayload = `` /* 189-byte string literal not displayed */

	ModifiedIdentifyPayload = `` /* 236-byte string literal not displayed */

	ModifiedTrackPayload = `` /* 337-byte string literal not displayed */

	ModifiedPagePayload = `` /* 261-byte string literal not displayed */

	ModifiedScreenPayload = `` /* 218-byte string literal not displayed */

	ModifiedAliasPayload = `` /* 183-byte string literal not displayed */

	ModifiedGroupPayload = `` /* 271-byte string literal not displayed */

	ReservedKeywordsIdentifyPayload = `` /* 411-byte string literal not displayed */

	ReservedKeywordsTrackPayload = `` /* 446-byte string literal not displayed */

	ReservedKeywordsPagePayload = `` /* 385-byte string literal not displayed */

	ReservedKeywordsScreenPayload = `` /* 340-byte string literal not displayed */

	ReservedKeywordsGroupPayload = `` /* 399-byte string literal not displayed */

)
View Source
const (
	WaitFor2Minute        = 2 * time.Minute
	WaitFor10Minute       = 10 * time.Minute
	DefaultQueryFrequency = 100 * time.Millisecond
)
View Source
const (
	BackoffDuration = 1 * time.Second
	BackoffRetryMax = 5
)
View Source
const (
	SnowflakeIntegrationTestCredentials = "SNOWFLAKE_INTEGRATION_TEST_CREDENTIALS"
	RedshiftIntegrationTestCredentials  = "REDSHIFT_INTEGRATION_TEST_CREDENTIALS"
	DeltalakeIntegrationTestCredentials = "DATABRICKS_INTEGRATION_TEST_CREDENTIALS"
	BigqueryIntegrationTestCredentials  = "BIGQUERY_INTEGRATION_TEST_CREDENTIALS"
)
View Source
const (
	SnowflakeIntegrationTestSchema = "SNOWFLAKE_INTEGRATION_TEST_SCHEMA"
	RedshiftIntegrationTestSchema  = "REDSHIFT_INTEGRATION_TEST_SCHEMA"
	DeltalakeIntegrationTestSchema = "DATABRICKS_INTEGRATION_TEST_SCHEMA"
	BigqueryIntegrationTestSchema  = "BIGQUERY_INTEGRATION_TEST_SCHEMA"
)
View Source
const (
	WorkspaceConfigPath   = "/etc/rudderstack/workspaceConfig.json"
	WorkspaceTemplatePath = "warehouse/testdata/workspaceConfig/template.json"
)

Variables

This section is empty.

Functions

func BigqueryCredentials added in v1.2.0

func BigqueryCredentials() (credentials bigquery.BQCredentialsT, err error)

func CreateBucketForMinio added in v1.2.0

func CreateBucketForMinio(t testing.TB, bucketName string)

func DatabricksCredentials added in v1.2.0

func DatabricksCredentials() (credentials databricks.CredentialsT, err error)

func DefaultSourceRunConfig added in v1.2.0

func DefaultSourceRunConfig() map[string]string

func GetUserId

func GetUserId(userType string) string

func PopulateTemplateConfigurations added in v1.2.0

func PopulateTemplateConfigurations() map[string]string

func RedshiftCredentials added in v1.2.0

func RedshiftCredentials() (credentials redshift.RedshiftCredentialsT, err error)

func Run

func Run(m *testing.M, setup WarehouseTestSetup) int

func Schema added in v1.2.0

func Schema(provider, schemaKey string) string

func SendAsyncRequest added in v1.2.0

func SendAsyncRequest(t testing.TB, wareHouseTest *WareHouseTest)

func SendAsyncStatusRequest added in v1.2.0

func SendAsyncStatusRequest(t testing.TB, wareHouseTest *WareHouseTest)

func SendEvents

func SendEvents(t testing.TB, wareHouseTest *WareHouseTest, eventsMap EventsCountMap)

func SendIntegratedEvents

func SendIntegratedEvents(t testing.TB, wareHouseTest *WareHouseTest, eventsMap EventsCountMap)

func SendModifiedEvents

func SendModifiedEvents(t testing.TB, wareHouseTest *WareHouseTest, eventsMap EventsCountMap)

func SetConfig

func SetConfig(kvs []warehouseutils.KeyValue) error

TODO: Make it retryable

func SnowflakeCredentials added in v1.2.0

func SnowflakeCredentials() (credentials snowflake.SnowflakeCredentialsT, err error)

func VerifyEventsInLoadFiles added in v1.2.0

func VerifyEventsInLoadFiles(t testing.TB, wareHouseTest *WareHouseTest, eventsMap EventsCountMap)

func VerifyEventsInStagingFiles added in v1.2.0

func VerifyEventsInStagingFiles(t testing.TB, wareHouseTest *WareHouseTest, eventsMap EventsCountMap)

func VerifyEventsInTableUploads added in v1.2.0

func VerifyEventsInTableUploads(t testing.TB, wareHouseTest *WareHouseTest, eventsMap EventsCountMap)

func VerifyEventsInWareHouse added in v1.2.0

func VerifyEventsInWareHouse(t testing.TB, wareHouseTest *WareHouseTest, eventsMap EventsCountMap)

func VerifyingConfigurationTest added in v1.2.0

func VerifyingConfigurationTest(t *testing.T, destination backendconfig.DestinationT)

func WithConstantBackoff

func WithConstantBackoff(operation func() error) error

Types

type EventsCountMap

type EventsCountMap map[string]int

func DefaultSourceEventMap added in v1.2.0

func DefaultSourceEventMap() EventsCountMap

func LoadFilesEventsMap added in v1.2.0

func LoadFilesEventsMap() EventsCountMap

func SendEventsMap added in v1.2.0

func SendEventsMap() EventsCountMap

func StagingFilesEventsMap added in v1.2.0

func StagingFilesEventsMap() EventsCountMap

func TableUploadsEventsMap added in v1.2.0

func TableUploadsEventsMap() EventsCountMap

func WarehouseEventsMap added in v1.2.0

func WarehouseEventsMap() EventsCountMap

func WarehouseSourceEventsMap added in v1.2.0

func WarehouseSourceEventsMap() EventsCountMap

type JobsDBResource

type JobsDBResource struct {
	Credentials *postgres.CredentialsT
	DB          *sql.DB
}

type WareHouseTest

type WareHouseTest struct {
	Client                       *client.Client
	WriteKey                     string
	SourceWriteKey               string
	Schema                       string
	UserId                       string
	MessageId                    string
	Tables                       []string
	Provider                     string
	LatestSourceRunConfig        map[string]string
	SourceID                     string
	DestinationID                string
	TimestampBeforeSendingEvents time.Time
}

func (*WareHouseTest) MsgId

func (w *WareHouseTest) MsgId() string

type WarehouseTestSetup

type WarehouseTestSetup interface {
	VerifyConnection() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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