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

testutils

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package testutils provides test utilities for the warehouse package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestAddColumn

func TestAddColumn(t *testing.T, driver warehouse.Driver, tableName string)

TestAddColumn performs a simple test for the AddColumn command.

func TestBasicWrites added in v0.10.0

func TestBasicWrites(t *testing.T, driver warehouse.Driver, tableName string)

TestBasicWrites performs a simple test for the Write command. It creates a table first, then writes data to it, ensuring both operations succeed.

func TestComplexWrites added in v0.10.0

func TestComplexWrites(t *testing.T, driver warehouse.Driver, tableName string)

TestComplexWrites performs tests for the Write command with complex data types.

func TestCreateTable

func TestCreateTable(t *testing.T, driver warehouse.Driver, tableName string)

TestCreateTable performs tests for the CreateTable command. It tests that creating a table twice results in an error.

func TestMissingColumns

func TestMissingColumns(
	t *testing.T,
	driver warehouse.Driver,
	tableName string,
)

TestMissingColumns performs comprehensive tests for the MissingColumns method. It tests various scenarios including empty tables, partial matches, type compatibility, and error conditions.

func TestQueryMapperTypeErrors

func TestQueryMapperTypeErrors(t *testing.T, qm warehouse.QueryMapper)

TestQueryMapperTypeErrors tests that the query mapper returns an error when an unsupported arrow type is used.

func TestSchema

func TestSchema() *arrow.Schema

TestSchema is a test schema for testing the query mapper.

func TestSupportedArrowTypes

func TestSupportedArrowTypes(t *testing.T, qm warehouse.QueryMapper)

TestSupportedArrowTypes tests that the query mapper correctly handles all supported Arrow types.

Types

type SupportedArrowTypesTestCase

type SupportedArrowTypesTestCase struct {
	Name          string
	Mapper        warehouse.QueryMapper
	SupportedType arrow.DataType
}

SupportedArrowTypesTestCase represents a test case for supported Arrow types in the query mapper.

type UnsupportedArrowTypeErrorTestCase

type UnsupportedArrowTypeErrorTestCase struct {
	Name        string
	Mapper      warehouse.QueryMapper
	Unsupported arrow.DataType
}

UnsupportedArrowTypeErrorTestCase represents a test case for unsupported Arrow types in the query mapper.

Jump to

Keyboard shortcuts

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