testutils

package
v0.0.0-...-621658c Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const K3sManifests = "/var/lib/rancher/k3s/server/manifests/"

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

func FunctionExists

func FunctionExists(ctx context.Context, t *testing.T, database, function, uri string) bool

func GetGitRootDir

func GetGitRootDir() (string, error)

func GetKubeConfig

func GetKubeConfig(ctx context.Context, k *k3s.K3sContainer) (*rest.Config, ctrlclient.Client, error)

func IntegrationTest

func IntegrationTest(t *testing.T)

func TableExists

func TableExists(ctx context.Context, t *testing.T, database, table, uri string) bool

func TableHasRows

func TableHasRows(ctx context.Context, t *testing.T, database, table, uri string) bool

func VerifyTableSchema

func VerifyTableSchema(ctx context.Context, t *testing.T, database, table, uri string, expect TableSchema)

func WriteKubeConfig

func WriteKubeConfig(ctx context.Context, k *k3s.K3sContainer, dir string) (string, error)

Types

type Function

type Function struct {
	Name       string `kusto:"Name"`
	Parameters string `kusto:"Parameters"`
	Body       string `kusto:"Body"`
	Folder     string `kusto:"Folder"`
	DocString  string `kusto:"DocString"`
}

func GetFunction

func GetFunction(ctx context.Context, t *testing.T, database, function, uri string) Function

type KqlSchema

type KqlSchema struct {
	ColumnName    string `kusto:"ColumnName"`
	ColumnOrdinal int    `kusto:"ColumnOrdinal"`
	DataType      string `kusto:"DataType"`
	ColumnType    string `kusto:"ColumnType"`
}

type RowCount

type RowCount struct {
	Count int64 `kusto:"Count"`
}

type Table

type Table struct {
	TableName    string `kusto:"TableName"`
	DatabaseName string `kusto:"DatabaseName"`
	Folder       string `kusto:"Folder"`
	DocString    string `kusto:"DocString"`
}

type TableSchema

type TableSchema interface {
	TableName() string
	CslColumns() []string
}

type Uploader

type Uploader struct {
	// contains filtered or unexported fields
}

func NewUploadReader

func NewUploadReader(client *kusto.Client, database string, table string) *Uploader

NewUploadReader implements ingest.Ingestor

func (*Uploader) Close

func (u *Uploader) Close() error

func (*Uploader) FromFile

func (u *Uploader) FromFile(ctx context.Context, fPath string, options ...ingest.FileOption) (*ingest.Result, error)

func (*Uploader) FromReader

func (u *Uploader) FromReader(ctx context.Context, reader io.Reader, options ...ingest.FileOption) (*ingest.Result, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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