service

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindTester

type BindTester struct {
	ServiceName string
	TargetType  string
	TargetName  string
	Protocol    string
	TargetPort  int

	ExpectServiceNotFound bool
	PolicyProhibits       bool
}

BindTester runs `skupper service bind` and validate skupper resources to assert that service has the corresponding target

func (*BindTester) Command

func (s *BindTester) Command(cluster *base.ClusterContext) []string

func (*BindTester) Run

func (s *BindTester) Run(cluster *base.ClusterContext) (stdout string, stderr string, err error)

type CreateTester

type CreateTester struct {
	Name            string
	Port            int
	Mapping         string
	PolicyProhibits bool
}

CreateTester runs `skupper service create` and asserts that the expected resources are defined in the cluster.

func (*CreateTester) Command

func (s *CreateTester) Command(cluster *base.ClusterContext) []string

func (*CreateTester) Run

func (s *CreateTester) Run(cluster *base.ClusterContext) (stdout string, stderr string, err error)

type DeleteTester

type DeleteTester struct {
	Name string
}

DeleteTester runs `skupper service delete` and asserts service has been removed from the cluster and also from skupper resources.

func (*DeleteTester) Command

func (s *DeleteTester) Command(cluster *base.ClusterContext) []string

func (*DeleteTester) Run

func (s *DeleteTester) Run(cluster *base.ClusterContext) (stdout string, stderr string, err error)

type StatusTester

type StatusTester struct {
	ServiceInterfaces             []types.ServiceInterface
	UnauthorizedServiceInterfaces []types.ServiceInterface
	// TODO REVIEW rename and use []types.ServiceInterface
	Absent bool

	// By default, if the service interface includes no targets, the test is
	// going to be successful, even if the actual response from the command
	// indicates it has targets (bindings).  This changes that behavior: if
	// the requested ServiceInterface had an empty Targets slice, it will be
	// an error if the command lists a bound target (or if the target lists
	// differ)
	CheckNotBound bool

	// By default, unauthorized interfaces count as good on ServiceInterfaces;
	// if this is set to true, then a service listed in ServiceInterfaces that
	// is reported as unauthorized will be reported as an error
	CheckAuthorization bool

	// By default, the command checks that what it has configured in
	// ServiceInterfaces is listed on the output.  If the option below is set
	// to true, it will also ensure that it is the whole list, and no other
	// interfaces are listed on the output
	StrictInterfaceListCheck bool
}

StatusTester runs `skupper service status` and asserts that its output contains the provided service interfaces (or until it times out).

func (*StatusTester) Command

func (s *StatusTester) Command(cluster *base.ClusterContext) []string

func (*StatusTester) Run

func (s *StatusTester) Run(cluster *base.ClusterContext) (stdout string, stderr string, err error)

type UnbindTester

type UnbindTester struct {
	ServiceName string
	TargetType  string
	TargetName  string
}

UnbindTester runs `skupper service unbind` and asserts that the corresponding service no longer has the given target.

func (*UnbindTester) Command

func (s *UnbindTester) Command(cluster *base.ClusterContext) []string

func (*UnbindTester) Run

func (s *UnbindTester) Run(cluster *base.ClusterContext) (stdout string, stderr string, err error)

Jump to

Keyboard shortcuts

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