fixtures

package
v0.3.29 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackendTemplateSecret added in v0.3.1

func NewBackendTemplateSecret(namespace, name string) *v1.Secret

NewBackendTemplateSecret returns a fake backend template secret

func NewCompletedPreloadJob added in v0.3.25

func NewCompletedPreloadJob(namespace, provider string) *batchv1.Job

NewCompletedPreloadJob returns a new running preload job

func NewConfigurationPodWatcher added in v0.3.10

func NewConfigurationPodWatcher(configuration *terraformv1alpha1.Configuration, stage string) *v1.Pod

NewConfigurationPodWatcher returns a new configuration pod

func NewCostsReport

func NewCostsReport(configuration *terraformv1alpha1.Configuration) *v1.Secret

NewCostsReport returns a secret used to mock a cost report for a configuration

func NewCostsSecret

func NewCostsSecret(namespace, name string) *v1.Secret

NewCostsSecret returns a fake costs secret

func NewFailedPreloadJob added in v0.3.25

func NewFailedPreloadJob(namespace, provider string) *batchv1.Job

NewFailedPreloadJob returns a new running preload job

func NewJobTemplateConfigmap

func NewJobTemplateConfigmap(namespace, name string) *v1.ConfigMap

NewJobTemplateConfigmap returns a custom job template configmap

func NewMatchAllPolicyConstraint

func NewMatchAllPolicyConstraint(name string) *terraformv1alpha1.Policy

NewMatchAllPolicyConstraint returns a policy which matches all configurations

func NewNamespace

func NewNamespace(name string) *v1.Namespace

NewNamespace returns a new namespace

func NewPolicy

func NewPolicy(name string) *terraformv1alpha1.Policy

NewPolicy returns an empty policy

func NewRunningPreloadJob added in v0.3.25

func NewRunningPreloadJob(namespace, provider string) *batchv1.Job

NewRunningPreloadJob returns a new running preload job

func NewTerraformJob

func NewTerraformJob(configuration *terraformv1alpha1.Configuration, namespace, stage string) *batchv1.Job

NewTerraformJob returns a new terraform job

func NewTerraformState

func NewTerraformState(configuration *terraformv1alpha1.Configuration) *v1.Secret

NewTerraformState returns a fake state

func NewTerranettesContext added in v0.3.25

func NewTerranettesContext(name string) *terraformv1alpha1.Context

NewTerranettesContext returns a new Context

func NewValidAWSNotReadyProvider

func NewValidAWSNotReadyProvider(name string, secret *v1.Secret) *terraformv1alpha1.Provider

NewValidAWSNotReadyProvider returns a ready aws provider

func NewValidAWSProvider

func NewValidAWSProvider(name string, secret *v1.Secret) *terraformv1alpha1.Provider

NewValidAWSProvider returns a valid provider for aws

func NewValidAWSProviderSecret

func NewValidAWSProviderSecret(namespace, name string) *v1.Secret

NewValidAWSProviderSecret returns a valid provider secret for aws

func NewValidAWSReadyProvider

func NewValidAWSReadyProvider(name string, secret *v1.Secret) *terraformv1alpha1.Provider

NewValidAWSReadyProvider returns a ready aws provider

func NewValidBucketConfiguration

func NewValidBucketConfiguration(namespace, name string) *terraformv1alpha1.Configuration

NewValidBucketConfiguration returns a valid configuration for aws bucket

Types

type Factory added in v0.3.10

type Factory struct {
	Config        cmd.Config
	KubeClient    k8sclient.Interface
	RuntimeClient client.Client
	Streams       genericclioptions.IOStreams
}

Factory is a test factory for the cli

func (*Factory) GetClient added in v0.3.10

func (f *Factory) GetClient() (client.Client, error)

GetClient returns the client for the kubernetes api

func (*Factory) GetConfig added in v0.3.10

func (f *Factory) GetConfig() (cmd.Config, bool, error)

GetConfig returns the config for the cli if available

func (*Factory) GetKubeClient added in v0.3.10

func (f *Factory) GetKubeClient() (k8sclient.Interface, error)

GetKubeClient returns the kubernetes client

func (*Factory) GetStreams added in v0.3.10

func (f *Factory) GetStreams() genericclioptions.IOStreams

GetStreams returns the input and output streams for the command

func (*Factory) Printf added in v0.3.10

func (f *Factory) Printf(format string, a ...interface{})

Printf prints a message to the output stream

func (*Factory) Println added in v0.3.10

func (f *Factory) Println(format string, a ...interface{})

Println prints a message to the output stream

func (*Factory) SaveConfig added in v0.3.10

func (f *Factory) SaveConfig(config cmd.Config) error

SaveConfig saves the configuration to the file

func (*Factory) Stdout added in v0.3.10

func (f *Factory) Stdout() io.Writer

Stdout returns the stdout io writer

Jump to

Keyboard shortcuts

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