helpers

package
v0.0.0-...-1d19bda Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigration

func RunMigration(t *testing.T, ctx context.Context, sourceURL, targetURL string, parallelJobs int, noOwner, noACL bool)

func RunMigrationExpectError

func RunMigrationExpectError(t *testing.T, ctx context.Context, sourceURL, targetURL string, parallelJobs int, noOwner, noACL bool, expectedError string)

func RunMigrationExpectSkip

func RunMigrationExpectSkip(t *testing.T, ctx context.Context, sourceURL, targetURL string, parallelJobs int, noOwner, noACL bool)

func RunMigrationWithExcludeSchemas

func RunMigrationWithExcludeSchemas(t *testing.T, ctx context.Context, sourceURL, targetURL string, excludeSchemas []string)

func RunMigrationWithOptions

func RunMigrationWithOptions(t *testing.T, ctx context.Context, sourceURL, targetURL string, opts MigrationOptions)

func ValidateBasicMigration

func ValidateBasicMigration(t *testing.T, ctx context.Context, targetConn *pgx.Conn)

func ValidateIDsInRange

func ValidateIDsInRange(t *testing.T, ctx context.Context, sourceConn, targetConn *pgx.Conn, tableName string, minID, maxID int)

func ValidatePrimaryKey

func ValidatePrimaryKey(t *testing.T, ctx context.Context, sourceConn, targetConn *pgx.Conn, tableName string)

func ValidateRowCount

func ValidateRowCount(t *testing.T, ctx context.Context, sourceConn, targetConn *pgx.Conn, tableName string) (int, int)

func ValidateSchemaColumns

func ValidateSchemaColumns(t *testing.T, ctx context.Context, sourceConn, targetConn *pgx.Conn, tableName string)

func ValidateSchemaConstraints

func ValidateSchemaConstraints(t *testing.T, ctx context.Context, sourceConn, targetConn *pgx.Conn, tableName string)

func ValidateTableMigration

func ValidateTableMigration(t *testing.T, ctx context.Context, sourceConn, targetConn *pgx.Conn, tableName string, validateChecksum bool)

Types

type MigrationOptions

type MigrationOptions struct {
	ParallelJobs     int
	NoOwner          bool
	NoACL            bool
	SkipVersionCheck bool
	DataOnly         bool
	ExcludeSchemas   []string
}

Jump to

Keyboard shortcuts

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