yttest

package
v0.0.0-...-5019c65 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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 interface{}) 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 interface{}) 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 interface{}) error

func (*Env) TmpPath

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

func (*Env) UploadSlice

func (e *Env) UploadSlice(path ypath.YPath, slice interface{}) 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