engine

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package engine provides the framework for a snapshot repository testing engine

Index

Constants

View Source
const (
	// S3BucketNameEnvKey is the environment variable required to connect to a repo on S3.
	S3BucketNameEnvKey = "S3_BUCKET_NAME"
)

Variables

View Source
var ErrS3BucketNameEnvUnset = fmt.Errorf("environment variable required: %v", S3BucketNameEnvKey)

ErrS3BucketNameEnvUnset is the error returned when the S3BucketNameEnvKey environment variable is not set.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	FileWriter *fio.Runner
	TestRepo   snap.Snapshotter
	MetaStore  snapmeta.Persister
	Checker    *checker.Checker
	// contains filtered or unexported fields
}

Engine is the outer level testing framework for robustness testing.

func NewEngine

func NewEngine(workingDir string) (*Engine, error)

NewEngine instantiates a new Engine and returns its pointer. It is currently created with: - FIO file writer - Kopia test repo snapshotter - Kopia metadata storage repo - FSWalker data integrity checker.

func (*Engine) Cleanup

func (e *Engine) Cleanup() error

Cleanup cleans up after each component of the test engine.

func (*Engine) InitFilesystem

func (e *Engine) InitFilesystem(ctx context.Context, testRepoPath, metaRepoPath string) error

InitFilesystem attempts to connect to a test repo and metadata repo on the local filesystem. If connection is successful, the engine is populated with the metadata associated with the snapshot in that repo. A new repo will be created if one does not already exist.

func (*Engine) InitS3

func (e *Engine) InitS3(ctx context.Context, testRepoPath, metaRepoPath string) error

InitS3 attempts to connect to a test repo and metadata repo on S3. If connection is successful, the engine is populated with the metadata associated with the snapshot in that repo. A new repo will be created if one does not already exist.

Jump to

Keyboard shortcuts

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