itest

package
v1.0.22 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const AgentLabelSelector = "app.kubernetes.io/name=ambassador-agent"

Variables

This section is empty.

Functions

func NewPodLogChan

func NewPodLogChan(ctx context.Context, cs kubernetes.Interface, labelSelector, ns string, follow bool) (<-chan string, error)

NewPodLogChan returns a chan with the specified pods logs entry-by-entry.

func PodExec

func PodExec(config *rest.Config, ns, podName string, cmd ...string) (stdout, stderr []byte, err error)

PodExec provides the functionality of `kubectl exec -n ns podName -- cmd...`.

func RunningPods added in v1.0.5

func RunningPods(ctx context.Context, cs kubernetes.Interface, labelSelector, ns string) ([]string, error)

RunningPods return the names of running pods with the given label selector in the form label=value. Running here means that at least one container is still running. I.e. the pod might well be terminating but still considered running.

Types

type AESTestSuite added in v1.0.22

type AESTestSuite struct {
	Suite
	// contains filtered or unexported fields
}

func (*AESTestSuite) SetupSuite added in v1.0.22

func (s *AESTestSuite) SetupSuite()

type AgentCom

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

func NewAgentCom

func NewAgentCom(name, ns string, restConfig *rest.Config) (*AgentCom, error)

func (*AgentCom) GetSnapshot

func (ac *AgentCom) GetSnapshot(ctx context.Context) (*agent.Snapshot, error)

func (*AgentCom) Install

func (ac *AgentCom) Install(ctx context.Context) (CleanupFunc, error)

func (*AgentCom) RPCAddress

func (ac *AgentCom) RPCAddress() string

func (*AgentCom) SetKATServerImage

func (ac *AgentCom) SetKATServerImage(image string)

func (*AgentCom) SetPort

func (ac *AgentCom) SetPort(p int)

type BasicTestSuite added in v1.0.22

type BasicTestSuite struct {
	Suite
	// contains filtered or unexported fields
}

func (*BasicTestSuite) SetupSuite added in v1.0.22

func (s *BasicTestSuite) SetupSuite()

type CleanupFunc

type CleanupFunc func(context.Context) error

func InstallHelmChart

func InstallHelmChart(ctx context.Context, config InstallationConfig) (CleanupFunc, error)

type CloudTokenTestSuite added in v1.0.22

type CloudTokenTestSuite struct {
	Suite
}

func (*CloudTokenTestSuite) SetupSuite added in v1.0.22

func (s *CloudTokenTestSuite) SetupSuite()

type InstallationConfig

type InstallationConfig struct {
	ReleaseName string
	Namespace   string
	ChartDir    string
	Values      map[string]any

	RESTConfig *rest.Config
	Log        action.DebugLog
}

type Suite added in v1.0.5

type Suite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*Suite) Cleanup added in v1.0.5

func (s *Suite) Cleanup(f func(context.Context) error)

func (*Suite) Config added in v1.0.5

func (s *Suite) Config() *rest.Config

func (*Suite) Context added in v1.0.5

func (s *Suite) Context() context.Context

func (*Suite) CreateNamespace added in v1.0.5

func (s *Suite) CreateNamespace(ctx context.Context, ns string) error

func (*Suite) DeleteNamespace added in v1.0.5

func (s *Suite) DeleteNamespace(ctx context.Context, ns string) error

func (*Suite) Init added in v1.0.5

func (s *Suite) Init()

func (*Suite) K8sIf added in v1.0.5

func (s *Suite) K8sIf() kubernetes.Interface

func (*Suite) Name added in v1.0.5

func (s *Suite) Name() string

func (*Suite) Namespace added in v1.0.5

func (s *Suite) Namespace() string

func (*Suite) TearDownSuite added in v1.0.22

func (s *Suite) TearDownSuite()

Jump to

Keyboard shortcuts

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