statefixtures

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package statefixtures provides a fake state provider for use in unit tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeStateLoader

func NewFakeStateLoader(fixture FixtureName, t *testing.T, thelmaHome string, shellRunner shell.Runner) (terra.StateLoader, error)

NewFakeStateLoader (FOR USE IN TESTS ONLY) returns a state loader that loads fake state from test fixtures.

Types

type Fixture

type Fixture interface {
	Environment(name string) terra.Environment
	Cluster(name string) terra.Cluster
	Release(name string, dest string) terra.Release
	AllReleases() []terra.Release
}

Fixture is a convenience interface for retrieving environments, clusters and from state by name

func LoadFixture

func LoadFixture(name FixtureName, t *testing.T) Fixture

func NewFixture

func NewFixture(state terra.State) Fixture

type FixtureName

type FixtureName int

FixtureName is an enum type for different fixtures in the fixtures/ directory.

const (
	Default FixtureName = iota
)

func (FixtureName) String

func (f FixtureName) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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