helpers

package
v0.0.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAgent

func CreateAgent(env *Env, stage string) *agent.Agent

func GenerateAlias

func GenerateAlias() string

func PrepareAPI

func PrepareAPI(t *testing.T) (*Env, *RequestClient)

func PrepareMonitoring

func PrepareMonitoring(t *testing.T) (*Env, *agent.Agent, *RequestClient)

func Wait added in v0.0.7

func Wait(t *testing.T, predicate func() bool)

Types

type Config added in v0.0.7

type Config struct {
	Family string

	ControllerConfig  yson.RawValue
	ControllerFactory strawberry.ControllerFactory

	ClusterInitializerFactory strawberry.ClusterInitializerFactory
}

type DummyLeader

type DummyLeader struct{}

func (DummyLeader) IsLeader

func (a DummyLeader) IsLeader() bool

type Env

type Env struct {
	*yttest.Env
	StrawberryRoot ypath.Path
}

func PrepareAgent

func PrepareAgent(t *testing.T) (*Env, *agent.Agent)

func PrepareEnv

func PrepareEnv(t *testing.T) *Env

type RequestClient

type RequestClient struct {
	Endpoint string
	Proxy    string
	User     string
	Env      *Env
	// contains filtered or unexported fields
}

func PrepareClient

func PrepareClient(t *testing.T, env *Env, proxy string, server *httpserver.HTTPServer) *RequestClient

func PrepareController added in v0.0.7

func PrepareController(t *testing.T, c *Config) (client *RequestClient, teardownCb func(t *testing.T))

func (*RequestClient) GetBriefInfo added in v0.0.7

func (c *RequestClient) GetBriefInfo(alias string) strawberry.OpletBriefInfo

func (*RequestClient) MakeGetRequest

func (c *RequestClient) MakeGetRequest(command string, params api.RequestParams) Response

func (*RequestClient) MakePostRequest

func (c *RequestClient) MakePostRequest(command string, params api.RequestParams) Response

func (*RequestClient) MakePostRequestWithFormat added in v0.0.6

func (c *RequestClient) MakePostRequestWithFormat(command string, params api.RequestParams, format api.FormatType) Response

func (*RequestClient) MakeRequest

func (c *RequestClient) MakeRequest(httpMethod string, command string, params api.RequestParams, format api.FormatType) Response

type Response

type Response struct {
	StatusCode int
	Body       []byte
}

Jump to

Keyboard shortcuts

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