testutils

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 15 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_CONNECTION_ID = "test_connection_id"
	TEST_HASH          = "test_hash"
	TEST_PUBLIC_KEY    = "test_public_key"
)
View Source
var CertificateHash string
View Source
var EncodedCertificate string
View Source
var SeededRand *rand.Rand = rand.New(rand.NewSource(time.Now().UnixNano()))

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 AssertIsNil added in v0.9.1

func AssertIsNil(t *testing.T, value *int)

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 CleanupConnections added in v1.1.1

func CleanupConnections(groupId string)

func CleanupDestinations

func CleanupDestinations()

func CleanupExternalLogging

func CleanupExternalLogging()

func CleanupGroups

func CleanupGroups()

func CleanupHybridDeploymentAgents added in v1.0.0

func CleanupHybridDeploymentAgents()
func CleanupPrivateLinks()

func CleanupProxy added in v0.8.5

func CleanupProxy()

func CleanupTeams

func CleanupTeams()

func CleanupTrasformationProjects added in v1.0.7

func CleanupTrasformationProjects()

func CleanupTrasformations added in v1.0.7

func CleanupTrasformations()

func CleanupUsers

func CleanupUsers()

func CleanupWebhooks

func CleanupWebhooks()

func CreateConnection added in v1.1.1

func CreateConnection(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 CreateHybridDeploymentAgent added in v1.0.0

func CreateHybridDeploymentAgent(t *testing.T) string
func CreatePrivateLink(t *testing.T) string

Private Links

func CreateProxy added in v0.8.5

func CreateProxy(t *testing.T) string

func CreateTeam

func CreateTeam(t *testing.T) string

Begin Team Management

func CreateTeamConnection added in v1.1.1

func CreateTeamConnection(t *testing.T, teamId string, connectionId string)

func CreateTeamGroup

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

func CreateTeamUser

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

func CreateTempConnection added in v1.1.1

func CreateTempConnection(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

func CreateTempTransformationProject added in v1.0.7

func CreateTempTransformationProject(t *testing.T) 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 CreateTransformationProject added in v1.0.7

func CreateTransformationProject(t *testing.T) string

func CreateUser

func CreateUser(t *testing.T) string

func CreateUserConnection added in v1.1.1

func CreateUserConnection(t *testing.T, userId string, connectionId 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 DeleteConnection added in v1.1.1

func DeleteConnection(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 DeleteHybridDeploymentAgent added in v1.0.0

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

func DeleteProxy added in v0.8.5

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

func DeleteTeam

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

func DeleteTeamConnection added in v1.1.1

func DeleteTeamConnection(t *testing.T, teamId string, connectionId string)

func DeleteTeamGroup

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

func DeleteTeamUser

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

func DeleteTransformation added in v1.0.7

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

func DeleteTransformationProject added in v1.0.7

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

func DeleteUser

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

func DeleteUserConnection added in v1.1.1

func DeleteUserConnection(t *testing.T, userId string, connectionId 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