Documentation
¶
Overview ¶
Package testutils provides test utilities for the warehouse package.
Index ¶
- func TestAddColumn(t *testing.T, driver warehouse.Driver, tableName string)
- func TestBasicWrites(t *testing.T, driver warehouse.Driver, tableName string)
- func TestComplexWrites(t *testing.T, driver warehouse.Driver, tableName string)
- func TestCreateTable(t *testing.T, driver warehouse.Driver, tableName string)
- func TestMissingColumns(t *testing.T, driver warehouse.Driver, tableName string)
- func TestQueryMapperTypeErrors(t *testing.T, qm warehouse.QueryMapper)
- func TestSchema() *arrow.Schema
- func TestSupportedArrowTypes(t *testing.T, qm warehouse.QueryMapper)
- type SupportedArrowTypesTestCase
- type UnsupportedArrowTypeErrorTestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestAddColumn ¶
TestAddColumn performs a simple test for the AddColumn command.
func TestBasicWrites ¶ added in v0.10.0
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
TestComplexWrites performs tests for the Write command with complex data types.
func TestCreateTable ¶
TestCreateTable performs tests for the CreateTable command. It tests that creating a table twice results in an error.
func TestMissingColumns ¶
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 ¶
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.