testutil

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package testutil provides basic utilities for testing the client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartMockFlightServer

func StartMockFlightServer(t *testing.T, blobSize int64) *flight.Server

Types

type BlobTicket

type BlobTicket struct {
	Name string
	Size int64
}

func BlobTicketFromJSONBytes

func BlobTicketFromJSONBytes(jsBytes []byte) (*BlobTicket, error)

func NewBlobTicket

func NewBlobTicket(size int64) *BlobTicket

func (*BlobTicket) ToJSONBytes

func (bt *BlobTicket) ToJSONBytes() []byte

func (*BlobTicket) ToJSONString

func (bt *BlobTicket) ToJSONString() string

type ErrorMessageMockReader

type ErrorMessageMockReader struct {
	Counter      int
	ErrorMessage string
}

func (*ErrorMessageMockReader) Message

func (emmr *ErrorMessageMockReader) Message() (*ipc.Message, error)

func (*ErrorMessageMockReader) Release

func (emmr *ErrorMessageMockReader) Release()

func (*ErrorMessageMockReader) Retain

func (emmr *ErrorMessageMockReader) Retain()

type MockFlightServer

type MockFlightServer struct {
	BlobSize int64
	Records  map[string][]arrow.Record
	flight.BaseFlightServer
}

func (*MockFlightServer) DoGet

func (*MockFlightServer) MakeBlobRecords

func (f *MockFlightServer) MakeBlobRecords(name string, size int64) []arrow.Record

func (*MockFlightServer) MakeConstantRecords

func (f *MockFlightServer) MakeConstantRecords() []arrow.Record

type SQLQueryTicket

type SQLQueryTicket struct {
	Database  string
	QueryType string
	SQLQuery  string
}

func NewSQLQueryTicket

func NewSQLQueryTicket(database string, queryType string, query string) *SQLQueryTicket

func SQLQueryTicketFromJSONBytes

func SQLQueryTicketFromJSONBytes(jsBytes []byte) (*SQLQueryTicket, error)

type ServAuth

type ServAuth struct{}

func (*ServAuth) Authenticate

func (a *ServAuth) Authenticate(c flight.AuthConn) error

func (*ServAuth) IsValid

func (a *ServAuth) IsValid(token string) (any, error)

Jump to

Keyboard shortcuts

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