fixtures

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backend2Domain

func Backend2Domain[B BackendRC, D DomainRC](in []*B, ret *DomainRcList[D])

Backend2Domain -

Types

type AccTestCase

type AccTestCase struct {
	TestName    string       `yaml:"name"`
	TfConfig    string       `yaml:"tf-config"`
	Expected    BackendState `yaml:"expected-backend"`
	NonExpected BackendState `yaml:"not-expected-backend"`
}

AccTestCase -

type AccTests

type AccTests struct {
	Ctx            context.Context
	InitialBackend BackendState  `yaml:"initial-backend"`
	Cases          []AccTestCase `yaml:"cases"`
}

AccTests -

func (*AccTests) InitBackend

func (acc *AccTests) InitBackend(t *testing.T, c BackendClient)

InitBackend -

func (*AccTests) LoadFixture

func (acc *AccTests) LoadFixture(t *testing.T, fixtureName string)

LoadFixture -

type BackendClient

type BackendClient = protos.SecGroupServiceClient

BackendClient -

type BackendRcList

type BackendRcList[B BackendRC] []string

BackendRcList -

func (BackendRcList[B]) Decode

func (rcl BackendRcList[B]) Decode() (ret []*B)

Decode -

func (*BackendRcList[B]) Encode

func (rcl *BackendRcList[B]) Encode(objs []*B)

Encode -

type BackendState

type BackendState struct {
	Networks        BackendRcList[protos.Network]        `yaml:"networks"`
	SecGroups       BackendRcList[protos.SecGroup]       `yaml:"sec-groups"`
	SgSgRules       BackendRcList[protos.Rule]           `yaml:"sg-sg-rules"`
	SgFqdnRules     BackendRcList[protos.FqdnRule]       `yaml:"sg-fqdn-rules"`
	SgIcmpRules     BackendRcList[protos.SgIcmpRule]     `yaml:"sg-icmp-rules"`
	SgSgIcmpRules   BackendRcList[protos.SgSgIcmpRule]   `yaml:"sg-sg-icmp-rules"`
	CidrSgRules     BackendRcList[protos.CidrSgRule]     `yaml:"cidr-sg-rules"`
	CidrSgIcmpRules BackendRcList[protos.CidrSgIcmpRule] `yaml:"cidr-sg-icmp-rules"`
	IESgSgRules     BackendRcList[protos.SgSgRule]       `yaml:"ie-sg-sg-rules"`
	IESgSgIcmpRules BackendRcList[protos.IESgSgIcmpRule] `yaml:"ie-sg-sg-icmp-rules"`
}

BackendState -

type DomainRcList

type DomainRcList[T DomainRC] []T

DomainRcList -

func (DomainRcList[T]) AllIn

func (lst DomainRcList[T]) AllIn(other DomainRcList[T], fullCompare bool) bool

AllIn -

func (DomainRcList[T]) AnyIn

func (lst DomainRcList[T]) AnyIn(other DomainRcList[T], fullCompare bool) bool

AnyIn -

func (DomainRcList[T]) ToDict

func (lst DomainRcList[T]) ToDict() (ret dict.HDict[string, T])

ToDict -

type ExpectationsChecker

type ExpectationsChecker[B BackendRC, D DomainRC] struct {
	// contains filtered or unexported fields
}

ExpectationsChecker -

func (*ExpectationsChecker[B, D]) Init

func (exp *ExpectationsChecker[B, D]) Init(b []*B)

Init -

func (ExpectationsChecker[B, D]) WeDontExpectFindAny

func (exp ExpectationsChecker[B, D]) WeDontExpectFindAny(objs []*B) bool

WeDontExpectFindAny -

func (ExpectationsChecker[B, D]) WeExpectFindAll

func (exp ExpectationsChecker[B, D]) WeExpectFindAll(objs []*B) bool

WeExpectFindAll -

Jump to

Keyboard shortcuts

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