Help us shape the future of Go! Take the 2026 Go Developer Survey

integrationtest

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteStatements

func ExecuteStatements(t *testing.T, c sqlconnect.DB, schema, path string)

func GenerateTestSchema

func GenerateTestSchema(formatfn func(string) string) string

func ReadSQLStatements

func ReadSQLStatements(t *testing.T, schema, path string) []string

func TestDatabaseScenarios

func TestDatabaseScenarios(t *testing.T, warehouse string, configJSON json.RawMessage, formatfn func(string) string, opts Options)

func TestSshTunnelScenarios added in v1.1.0

func TestSshTunnelScenarios(t *testing.T, warehouse string, configJSON json.RawMessage)

Types

type Options

type Options struct {
	// LegacySupport enables the use of legacy column mappings
	LegacySupport bool

	SpecialCharactersInQuotedTable string // special characters to test in quoted table identifiers (default: <space>,",',“)
	DateOf                         func(column string) string

	ExtraTests func(t *testing.T, db sqlconnect.DB)

	// CreateTableSuffix is appended to the raw CREATE TABLE statements, for engines that require a clause.
	CreateTableSuffix string

	// QuotedConditionIdentifiers makes the date add subtest pass the bare column: the dialect quotes the operand.
	QuotedConditionIdentifiers bool

	// NewDB builds the database under test. Nil means sqlconnect.NewDB.
	NewDB func(json.RawMessage) (sqlconnect.DB, error)

	// NoLegacyMappings skips the legacy column and json mapper subtest.
	NoLegacyMappings bool

	// OpaqueExpressionErrors skips the check that an expression error names the refused operator: the driver
	// bounds its error text and never echoes caller input.
	OpaqueExpressionErrors bool

	// ReportsViews expects ListTables to report a view with the view relation type.
	ReportsViews bool
}

Jump to

Keyboard shortcuts

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