testhelper

package
v1.7.0-preview.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

	AsyncWhPayload = `` /* 197-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"
	SnowflakeRBACIntegrationTestCredentials = "SNOWFLAKE_RBAC_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/integrations/testdata/workspaceConfig/template.json"
)

Variables

This section is empty.

Functions

func BigqueryCredentials

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

func CreateBucketForMinio

func CreateBucketForMinio(t testing.TB, bucketName string)

func DatabricksCredentials

func DatabricksCredentials() (credentials client.Credentials, err error)

func GetUserId

func GetUserId(provider string) string

func PopulateTemplateConfigurations

func PopulateTemplateConfigurations() map[string]string

func RedshiftCredentials

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

func Schema

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

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

func SnowflakeCredentials

func SnowflakeCredentials(env string) (credentials snowflake.Credentials, err error)

func VerifyConfigurationTest

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

func SourcesLoadFilesEventsMap() EventsCountMap

func SourcesSendEventsMap

func SourcesSendEventsMap() EventsCountMap

func SourcesStagingFilesEventsMap

func SourcesStagingFilesEventsMap() EventsCountMap

func SourcesTableUploadsEventsMap

func SourcesTableUploadsEventsMap() EventsCountMap

func SourcesWarehouseEventsMap

func SourcesWarehouseEventsMap() EventsCountMap

type WareHouseTest

type WareHouseTest struct {
	Client                       *warehouseclient.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

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

func (*WareHouseTest) VerifyModifiedEvents

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