testhelper

package
v0.0.0-...-0ade494 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdentifyPayload = `` /* 199-byte string literal not displayed */

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

	PagePayload = `` /* 180-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 = `` /* 262-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 = `` /* 386-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
	LongRunningQueryFrequency = 10000 * 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"
	SnowflakeIntegrationTestSchema      = "SNOWFLAKE_INTEGRATION_TEST_SCHEMA"
	RedshiftIntegrationTestSchema       = "REDSHIFT_INTEGRATION_TEST_SCHEMA"
	DeltalakeIntegrationTestSchema      = "DATABRICKS_INTEGRATION_TEST_SCHEMA"
	BigqueryIntegrationTestSchema       = "BIGQUERY_INTEGRATION_TEST_SCHEMA"
	WorkspaceConfigPath                 = "/etc/rudderstack/workspaceConfig.json"
)

Variables

This section is empty.

Functions

func BRTJobsForUserId

func BRTJobsForUserId() string

func GWJobsForUserIdWriteKey

func GWJobsForUserIdWriteKey() string

func GetSchema

func GetSchema(provider, schemaKey string) string

func GetUserId

func GetUserId(userType string) string

func Run

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

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(kvs []warehouseutils.KeyValue) error

func VerifyingBatchRouterEvents

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

func VerifyingGatewayEvents

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

func VerifyingTablesEventCount

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

func WithConstantBackoff

func WithConstantBackoff(operation func() error) error

Types

type EventsCountMap

type EventsCountMap map[string]int

func DefaultEventMap

func DefaultEventMap() EventsCountMap

type JobsDBResource

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

type WareHouseTest

type WareHouseTest struct {
	Client               *client.Client
	WriteKey             string
	Schema               string
	TablesQueryFrequency time.Duration
	EventsCountMap       EventsCountMap
	UserId               string
	MessageId            string
	Tables               []string
	Provider             string
}

func (*WareHouseTest) MsgId

func (w *WareHouseTest) MsgId() string

func (*WareHouseTest) SetUserId

func (w *WareHouseTest) SetUserId(destType 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