testhelper

package
v1.5.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

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

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

	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 */

	ModifiedGoogleSheetsPayload = `` /* 559-byte string literal not displayed */

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

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

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

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

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

	ReservedGoogleSheetsPayload = `` /* 721-byte string literal not displayed */

)
View Source
const (
	WaitFor2Minute         = 2 * time.Minute
	WaitFor10Minute        = 10 * time.Minute
	DefaultQueryFrequency  = 100 * time.Millisecond
	AsyncJOBQueryFrequency = 1000 * 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 GetUserId

func GetUserId(provider 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 Schema added in v1.2.0

func Schema(provider, schemaKey string) string

func SendEvents

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

func SendIntegratedEvents

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

func SendModifiedEvents

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

func SetConfig

func SetConfig(t testing.TB, kvs []warehouseutils.KeyValue)

func SetUpJobsDB added in v1.5.0

func SetUpJobsDB(t testing.TB) *sql.DB

func SnowflakeCredentials added in v1.2.0

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

func VerifyConfigurationTest added in v1.5.0

func VerifyConfigurationTest(t testing.TB, destination backendconfig.DestinationT)

func WithConstantBackoff

func WithConstantBackoff(operation func() error) error

Types

type EventsCountMap

type EventsCountMap map[string]int

func SourcesLoadFilesEventsMap added in v1.5.0

func SourcesLoadFilesEventsMap() EventsCountMap

func SourcesSendEventsMap added in v1.5.0

func SourcesSendEventsMap() EventsCountMap

func SourcesStagingFilesEventsMap added in v1.5.0

func SourcesStagingFilesEventsMap() EventsCountMap

func SourcesTableUploadsEventsMap added in v1.5.0

func SourcesTableUploadsEventsMap() EventsCountMap

func SourcesWarehouseEventsMap added in v1.5.0

func SourcesWarehouseEventsMap() EventsCountMap

type WareHouseTest

type WareHouseTest struct {
	Client                       *client.Client
	WriteKey                     string
	Schema                       string
	UserID                       string
	MessageID                    string
	JobRunID                     string
	TaskRunID                    string
	RecordID                     string
	Tables                       []string
	Provider                     string
	SourceID                     string
	DestinationID                string
	TimestampBeforeSendingEvents time.Time
	EventsMap                    EventsCountMap
	StagingFilesEventsMap        EventsCountMap
	LoadFilesEventsMap           EventsCountMap
	TableUploadsEventsMap        EventsCountMap
	WarehouseEventsMap           EventsCountMap
	JobsDB                       *sql.DB
	AsyncJob                     bool
	Prerequisite                 func(t testing.TB)
	StatsToVerify                []string
	SkipWarehouse                bool
}

func (*WareHouseTest) VerifyEvents added in v1.5.0

func (w *WareHouseTest) VerifyEvents(t testing.TB)

func (*WareHouseTest) VerifyModifiedEvents added in v1.5.0

func (w *WareHouseTest) VerifyModifiedEvents(t testing.TB)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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