helpers

package
v0.0.0-...-81cd6e7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeElasticsearchClient

func NewFakeElasticsearchClient(cluster, namespace string, k8sClient client.Client, chatter *FakeElasticsearchChatter) esclient.Client

func NewFakeSendRequestFn

func NewFakeSendRequestFn(chatter *FakeElasticsearchChatter) esclient.FnEsSendRequest

func NormalizeJSON

func NormalizeJSON(doc string) string

func NormalizeYaml

func NormalizeYaml(doc string) string

Types

type EnvVarExpectation

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

func (*EnvVarExpectation) WithFieldRefPath

func (exp *EnvVarExpectation) WithFieldRefPath(path string) *EnvVarExpectation

func (*EnvVarExpectation) WithValue

func (exp *EnvVarExpectation) WithValue(value string) *EnvVarExpectation

type EnvVarsExpectation

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

func ExpectEnvVars

func ExpectEnvVars(envVars []v1.EnvVar) *EnvVarsExpectation

func (*EnvVarsExpectation) ToIncludeName

func (exp *EnvVarsExpectation) ToIncludeName(name string) *EnvVarExpectation

type FakeElasticsearchChatter

type FakeElasticsearchChatter struct {
	Requests     map[string]FakeElasticsearchRequests
	RequestOrder map[string]int
	Responses    map[string]FakeElasticsearchResponses
	// contains filtered or unexported fields
}

func NewFakeElasticsearchChatter

func NewFakeElasticsearchChatter(responses map[string]FakeElasticsearchResponses) *FakeElasticsearchChatter

func (*FakeElasticsearchChatter) GetRequest

func (*FakeElasticsearchChatter) GetResponse

type FakeElasticsearchRequest

type FakeElasticsearchRequest struct {
	URI    string
	Method string
	Body   string
	SeqNo  int
}

type FakeElasticsearchRequests

type FakeElasticsearchRequests []FakeElasticsearchRequest

type FakeElasticsearchResponse

type FakeElasticsearchResponse struct {
	Error      error
	StatusCode int
	Body       string
}

func (*FakeElasticsearchResponse) BodyAsResponseBody

func (response *FakeElasticsearchResponse) BodyAsResponseBody() map[string]interface{}

type FakeElasticsearchResponses

type FakeElasticsearchResponses []FakeElasticsearchResponse

type JSONExpectation

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

func ExpectJSON

func ExpectJSON(doc string) *JSONExpectation

func (*JSONExpectation) ToEqual

func (exp *JSONExpectation) ToEqual(doc string)

type YamlExpectation

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

func ExpectYaml

func ExpectYaml(doc string) *YamlExpectation

func (*YamlExpectation) ToEqual

func (exp *YamlExpectation) ToEqual(doc string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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