helm

package
v0.0.0-...-c302471 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 19 Imported by: 0

README

helm

import "github.com/eclipse-symphony/symphony/packages/testutils/expectations/helm"

Index

Variables

var (
    DeployedCondition = jq.Equality(".info.status", "deployed")
    FailedCondition   = jq.Equality(".info.status", "failed")
)

type HelmExpectation

type HelmExpectation struct {
    // contains filtered or unexported fields
}

func MustNew
func MustNew(name, namespace string, opts ...Option) *HelmExpectation

MustNew creates a new helm expectation. It panics if the expectation cannot be created.

func MustNewAbsent
func MustNewAbsent(name, namespace string, opts ...Option) *HelmExpectation

NewPresent creates a new helm expectation that expects the release to be present.

func NewExpectation
func NewExpectation(pattern, namespace string, opts ...Option) (*HelmExpectation, error)

NewExpectation creates a new helm expectation.

func (*HelmExpectation) AsGomegaSubject
func (e *HelmExpectation) AsGomegaSubject() func(context.Context) (interface{}, error)

func (*HelmExpectation) Description
func (he *HelmExpectation) Description() string

func (*HelmExpectation) Id
func (he *HelmExpectation) Id() string

Id implements types.Expectation.

func (*HelmExpectation) ToGomegaMatcher
func (e *HelmExpectation) ToGomegaMatcher() gomega.GomegaMatcher

func (*HelmExpectation) Verify
func (he *HelmExpectation) Verify(c context.Context) error

Verify implements types.Expectation.

type ListRunner

type ListRunner interface {
    Run() ([]*release.Release, error)
}

type Option

type Option func(*HelmExpectation)

func WithDescription
func WithDescription(description string) Option

func WithListClientBuilder
func WithListClientBuilder(builder func() (ListRunner, error)) Option

func WithLogger
func WithLogger(logger func(format string, args ...interface{})) Option

func WithReleaseCondition
func WithReleaseCondition(condition types.Condition) Option

func WithReleaseListCondition
func WithReleaseListCondition(condition types.Condition) Option

func WithRemoved
func WithRemoved(removed bool) Option

WithRemoved specifies whether the release is expected to be present or not.

func WithValueCondition
func WithValueCondition(condition types.Condition) Option

func WithValueListCondition
func WithValueListCondition(condition types.Condition) Option

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DeployedCondition = jq.Equality(".info.status", "deployed")
	FailedCondition   = jq.Equality(".info.status", "failed")
)

Functions

This section is empty.

Types

type HelmExpectation

type HelmExpectation struct {
	// contains filtered or unexported fields
}

func MustNew

func MustNew(name, namespace string, opts ...Option) *HelmExpectation

MustNew creates a new helm expectation. It panics if the expectation cannot be created.

func MustNewAbsent

func MustNewAbsent(name, namespace string, opts ...Option) *HelmExpectation

NewPresent creates a new helm expectation that expects the release to be present.

func NewExpectation

func NewExpectation(pattern, namespace string, opts ...Option) (*HelmExpectation, error)

NewExpectation creates a new helm expectation.

func (*HelmExpectation) AsGomegaSubject

func (e *HelmExpectation) AsGomegaSubject() func(context.Context) (interface{}, error)

func (*HelmExpectation) Description

func (he *HelmExpectation) Description() string

func (*HelmExpectation) Id

func (he *HelmExpectation) Id() string

Id implements types.Expectation.

func (*HelmExpectation) ToGomegaMatcher

func (e *HelmExpectation) ToGomegaMatcher() gomega.GomegaMatcher

func (*HelmExpectation) Verify

func (he *HelmExpectation) Verify(c context.Context) error

Verify implements types.Expectation.

type ListRunner

type ListRunner interface {
	Run() ([]*release.Release, error)
}

type Option

type Option func(*HelmExpectation)

func WithDescription

func WithDescription(description string) Option

func WithListClientBuilder

func WithListClientBuilder(builder func() (ListRunner, error)) Option

func WithLogger

func WithLogger(logger func(format string, args ...interface{})) Option

func WithReleaseCondition

func WithReleaseCondition(condition types.Condition) Option

func WithReleaseListCondition

func WithReleaseListCondition(condition types.Condition) Option

func WithRemoved

func WithRemoved(removed bool) Option

WithRemoved specifies whether the release is expected to be present or not.

func WithValueCondition

func WithValueCondition(condition types.Condition) Option

func WithValueListCondition

func WithValueListCondition(condition types.Condition) Option

Jump to

Keyboard shortcuts

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