Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Fixture ¶
type Fixture interface { Environment(name string) *statemocks.Environment Cluster(name string) *statemocks.Cluster Release(name string, dest string) terra.Release AllReleases() []terra.Release Mocks() *Mocks }
Fixture is a convenience interface for retrieving environments, clusters and from state by name
func LoadFixture
deprecated
func LoadFixture(name FixtureName) (Fixture, error)
LoadFixture load a state fixture for use in tests
Deprecated: this package was added for backwards compatibility when we deleted gitops state; new tests that depend on state should set up their own mocks.
Old tests should also ideally be refactored to mock their own state or pass in their own fixture data
func LoadFixtureFromFile ¶ added in v1.0.76
LoadFixture load a state fixture for use in tests. See default state fixture o
func NewFixture ¶
type FixtureData ¶
type FixtureData struct { Clusters []Cluster Environments []Environment Charts []Chart Releases []Release }
FixtureData root type for a fixture definition file
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
type Mocks ¶
type Mocks struct { Clusters *statemocks.Clusters Destinations *StubDestinations Environments *StubEnvironments Releases *StubReleases State *statemocks.State StateLoader *statemocks.StateLoader Items struct { Clusters map[string]*statemocks.Cluster Environments map[string]*statemocks.Environment AppReleases map[string]*statemocks.AppRelease ClusterReleases map[string]*statemocks.ClusterRelease } }
type StubDestinations ¶
type StubDestinations struct {
*statemocks.Destinations
}
func (*StubDestinations) Filter ¶
func (m *StubDestinations) Filter(filter terra.DestinationFilter) ([]terra.Destination, error)
type StubEnvironments ¶
type StubEnvironments struct {
*statemocks.Environments
}
func (*StubEnvironments) Filter ¶
func (m *StubEnvironments) Filter(filter terra.EnvironmentFilter) ([]terra.Environment, error)
type StubReleases ¶
type StubReleases struct {
*statemocks.Releases
}
func (*StubReleases) Filter ¶
func (m *StubReleases) Filter(filter terra.ReleaseFilter) ([]terra.Release, error)
Click to show internal directories.
Click to hide internal directories.