yttest

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Overview

Package yttest contains testing helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadSlice

func DownloadSlice(ctx context.Context, c yt.TableClient, path ypath.YPath, value any) error

func NewLogger

func NewLogger(t testing.TB) (logger *zaplog.Logger, stop func())

func UploadSlice

func UploadSlice(ctx context.Context, c yt.Client, path ypath.YPath, slice any) error

Types

type Env

type Env struct {
	Ctx context.Context
	YT  yt.Client
	MR  mapreduce.Client
	L   log.Structured
}

func New

func New(t testing.TB, opts ...Option) *Env

func NewEnv

func NewEnv(t testing.TB, opts ...Option) (env *Env, cancel func())

func (*Env) DownloadSlice

func (e *Env) DownloadSlice(path ypath.YPath, value any) error

func (*Env) TmpPath

func (e *Env) TmpPath() ypath.Path

func (*Env) UploadSlice

func (e *Env) UploadSlice(path ypath.YPath, slice any) error

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithConfig

func WithConfig(c yt.Config) Option

func WithLogger

func WithLogger(l log.Structured) Option

Jump to

Keyboard shortcuts

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