Documentation
¶
Index ¶
- type Executable
- func ACK(node *envoy_core.Node, resourceType model.ResourceType) Executable
- func CloseStream() Executable
- func Create(ctx context.Context, r model.Resource, opts ...store.CreateOptionsFunc) Executable
- func DiscoveryRequest(node *envoy_core.Node, resourceType model.ResourceType) Executable
- func DiscoveryResponse(rs model.ResourceList, nonce, version string) Executable
- func ExpectNoResponseDuring(timeout time.Duration) Executable
- func NACK(node *envoy_core.Node, resourceType model.ResourceType) Executable
- func WaitRequest(timeout time.Duration, testFunc func(rs *envoy_sd.DiscoveryRequest)) Executable
- func WaitResponse(timeout time.Duration, testFunc func(rs []model.Resource)) Executable
- type TestContext
- type TestContextImpl
- func (t *TestContextImpl) ClientStream() *test_grpc.MockClientStream
- func (t *TestContextImpl) LastACKedResponse(typ string) *envoy_sd.DiscoveryResponse
- func (t *TestContextImpl) LastResponse(typ string) *envoy_sd.DiscoveryResponse
- func (t *TestContextImpl) SaveLastACKedResponse(typ string, response *envoy_sd.DiscoveryResponse)
- func (t *TestContextImpl) SaveLastResponse(typ string, response *envoy_sd.DiscoveryResponse)
- func (t *TestContextImpl) ServerStream() *test_grpc.MockServerStream
- func (t *TestContextImpl) Stop() chan struct{}
- func (t *TestContextImpl) Store() store.ResourceStore
- func (t *TestContextImpl) WaitGroup() *sync.WaitGroup
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executable ¶
type Executable func(tc TestContext) error
func ACK ¶
func ACK(node *envoy_core.Node, resourceType model.ResourceType) Executable
func CloseStream ¶
func CloseStream() Executable
func Create ¶
func Create(ctx context.Context, r model.Resource, opts ...store.CreateOptionsFunc) Executable
func DiscoveryRequest ¶
func DiscoveryRequest(node *envoy_core.Node, resourceType model.ResourceType) Executable
func DiscoveryResponse ¶
func DiscoveryResponse(rs model.ResourceList, nonce, version string) Executable
func ExpectNoResponseDuring ¶
func ExpectNoResponseDuring(timeout time.Duration) Executable
func NACK ¶
func NACK(node *envoy_core.Node, resourceType model.ResourceType) Executable
func WaitRequest ¶
func WaitRequest(timeout time.Duration, testFunc func(rs *envoy_sd.DiscoveryRequest)) Executable
func WaitResponse ¶
func WaitResponse(timeout time.Duration, testFunc func(rs []model.Resource)) Executable
type TestContext ¶
type TestContext interface { Store() store.ResourceStore ServerStream() *test_grpc.MockServerStream ClientStream() *test_grpc.MockClientStream Stop() chan struct{} SaveLastResponse(typ string, response *envoy_sd.DiscoveryResponse) LastResponse(typeURL string) *envoy_sd.DiscoveryResponse SaveLastACKedResponse(typ string, response *envoy_sd.DiscoveryResponse) LastACKedResponse(typ string) *envoy_sd.DiscoveryResponse WaitGroup() *sync.WaitGroup }
type TestContextImpl ¶
type TestContextImpl struct { ResourceStore store.ResourceStore MockStream *test_grpc.MockServerStream MockClientStream *test_grpc.MockClientStream StopCh chan struct{} Wg *sync.WaitGroup Responses map[string]*envoy_sd.DiscoveryResponse LastACKedResponses map[string]*envoy_sd.DiscoveryResponse }
func (*TestContextImpl) ClientStream ¶
func (t *TestContextImpl) ClientStream() *test_grpc.MockClientStream
func (*TestContextImpl) LastACKedResponse ¶
func (t *TestContextImpl) LastACKedResponse(typ string) *envoy_sd.DiscoveryResponse
func (*TestContextImpl) LastResponse ¶
func (t *TestContextImpl) LastResponse(typ string) *envoy_sd.DiscoveryResponse
func (*TestContextImpl) SaveLastACKedResponse ¶
func (t *TestContextImpl) SaveLastACKedResponse(typ string, response *envoy_sd.DiscoveryResponse)
func (*TestContextImpl) SaveLastResponse ¶
func (t *TestContextImpl) SaveLastResponse(typ string, response *envoy_sd.DiscoveryResponse)
func (*TestContextImpl) ServerStream ¶
func (t *TestContextImpl) ServerStream() *test_grpc.MockServerStream
func (*TestContextImpl) Stop ¶
func (t *TestContextImpl) Stop() chan struct{}
func (*TestContextImpl) Store ¶
func (t *TestContextImpl) Store() store.ResourceStore
func (*TestContextImpl) WaitGroup ¶
func (t *TestContextImpl) WaitGroup() *sync.WaitGroup
type Verifier ¶
type Verifier interface { Exec(Executable) Verifier Verify(TestContext) error }
Click to show internal directories.
Click to hide internal directories.