testutils

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PredefinedGroupName      = "GoSdkTesting"
	PredefinedUserEmail      = "dev-markov+go-fivetran-sdk@fivetran.com"
	PredefinedUserGivenName  = "Go"
	PredefinedUserFamilyName = "5Tran"
	PredefinedUserPhone      = "+1234567890"
	BqProjectId              = "dulcet-yew-246109"

	// ! WARNING !
	// ! Do not change these values on production ones !
	// ! When running e2e tests locally endure you're using BLANK ACCOUNT credentials !
	PredefinedGroupId = "sepulchre_settlement"
	PredefinedUserId  = "recoup_befell"
)

Tests should be re-written to not use a pre-defined user and group

Variables

View Source
var (
	TEST_KEY    = "test_key"
	TEST_SECRET = "test_secret"

	TEST_CONNECTOR_ID = "test_connector_id"
	TEST_HASH         = "test_hash"
	TEST_PUBLIC_KEY   = "test_public_key"
)
View Source
var CertificateHash string
View Source
var Client *fivetran.Client
View Source
var EncodedCertificate string

Functions

func AddUserToGroup

func AddUserToGroup(t *testing.T, groupId string, email string)

func AssertEmpty

func AssertEmpty(t *testing.T, actual interface{})

func AssertEqual

func AssertEqual(t *testing.T, actual interface{}, expected interface{})

func AssertHasKey added in v0.8.0

func AssertHasKey(t *testing.T, source map[string]interface{}, key string)

func AssertHasLength

func AssertHasLength(t *testing.T, actual interface{}, expected int)

func AssertHasNoKey added in v0.8.0

func AssertHasNoKey(t *testing.T, source map[string]interface{}, key string)

func AssertIsNotNil added in v0.8.0

func AssertIsNotNil(t *testing.T, value interface{})

func AssertKey added in v0.7.15

func AssertKey(t *testing.T, key string, requestPart map[string]interface{}, expectedValue interface{})

func AssertKeyValue added in v0.8.0

func AssertKeyValue(t *testing.T, source map[string]interface{}, key string, expected interface{})

func AssertNotEmpty

func AssertNotEmpty(t *testing.T, actual interface{})

func AssertTimeEqual added in v0.7.15

func AssertTimeEqual(t *testing.T, actualTime time.Time, expectedTime string)

func BoolToStr added in v0.8.0

func BoolToStr(b bool) string

func CleanupAccount

func CleanupAccount()

func CleanupConnectors

func CleanupConnectors(groupId string)

func CleanupDbtProjects

func CleanupDbtProjects()

func CleanupDbtTransformations

func CleanupDbtTransformations(projectId, nextCursor string)

func CleanupDestinations

func CleanupDestinations()

func CleanupExternalLogging

func CleanupExternalLogging()

func CleanupGroups

func CleanupGroups()
func CleanupPrivateLinks()

func CleanupTeams

func CleanupTeams()

func CleanupUsers

func CleanupUsers()

func CleanupWebhooks

func CleanupWebhooks()

func CreateConnector

func CreateConnector(t *testing.T) string

func CreateDbtDestination

func CreateDbtDestination(t *testing.T)

func CreateDbtProject

func CreateDbtProject(t *testing.T) string

func CreateDbtTransformation

func CreateDbtTransformation(t *testing.T) string

func CreateDestination

func CreateDestination(t *testing.T) string

func CreateExternalLogging

func CreateExternalLogging(t *testing.T) string

func CreateGroup

func CreateGroup(t *testing.T) string
func CreatePrivateLink(t *testing.T) (string, string, string)

func CreatePrivateLinkDestination added in v0.8.1

func CreatePrivateLinkDestination(t *testing.T, id string) string

func CreatePrivateLinkGroup added in v0.8.1

func CreatePrivateLinkGroup(t *testing.T) string

Private Links

func CreateTeam

func CreateTeam(t *testing.T) string

Begin Team Management

func CreateTeamConnector

func CreateTeamConnector(t *testing.T, teamId string, connectorId string)

func CreateTeamGroup

func CreateTeamGroup(t *testing.T, teamId string, groupId string)

func CreateTeamUser

func CreateTeamUser(t *testing.T, teamId string, userId string)

func CreateTempConnector

func CreateTempConnector(t *testing.T) string

func CreateTempDbtTransformation

func CreateTempDbtTransformation(t *testing.T) string

func CreateTempDestination

func CreateTempDestination(t *testing.T) string

func CreateTempExternalLogging

func CreateTempExternalLogging(t *testing.T) string

func CreateTempGroup

func CreateTempGroup(t *testing.T) string
func CreateTempPrivateLink(t *testing.T) (string, string)

func CreateTempUser

func CreateTempUser(t *testing.T) string

func CreateTempWebhook

func CreateTempWebhook(t *testing.T) string

func CreateTestClient added in v0.8.0

func CreateTestClient() (*fivetran.Client, *mock.HttpClient)

func CreateUser

func CreateUser(t *testing.T) string

func CreateUserConnector added in v0.8.0

func CreateUserConnector(t *testing.T, userId string, connectorId string)

func CreateUserGroup added in v0.8.0

func CreateUserGroup(t *testing.T, userId string, groupId string)

func CreateWebhookAccount

func CreateWebhookAccount(t *testing.T) string

func DeleteConnector

func DeleteConnector(t *testing.T, id string)

func DeleteDbtDestination

func DeleteDbtDestination()

func DeleteDbtTransformation

func DeleteDbtTransformation(t *testing.T, id string)

func DeleteDestination

func DeleteDestination(t *testing.T, id string)

func DeleteExternalLogging

func DeleteExternalLogging(t *testing.T, id string)

func DeleteGroup

func DeleteGroup(t *testing.T, id string)
func DeletePrivateLink(t *testing.T, id string)

func DeleteTeam

func DeleteTeam(t *testing.T, id string)

func DeleteTeamConnector

func DeleteTeamConnector(t *testing.T, teamId string, connectorId string)

func DeleteTeamGroup

func DeleteTeamGroup(t *testing.T, teamId string, groupId string)

func DeleteTeamUser

func DeleteTeamUser(t *testing.T, teamId string, userId string)

func DeleteUser

func DeleteUser(t *testing.T, id string)

func DeleteUserConnector added in v0.8.0

func DeleteUserConnector(t *testing.T, userId string, connectorId string)

func DeleteUserGroup added in v0.8.0

func DeleteUserGroup(t *testing.T, userId string, groupId string)

func DeleteWebhook

func DeleteWebhook(t *testing.T, id string)

func InitE2E

func InitE2E()

func IsPredefinedGroupExist

func IsPredefinedGroupExist() bool

func IsPredefinedUserExist

func IsPredefinedUserExist() bool

func RemoveUserFromGroup

func RemoveUserFromGroup(t *testing.T, groupId string, userId string)

func RequestBodyToJson added in v0.8.0

func RequestBodyToJson(t *testing.T, req *http.Request) map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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