osapitest

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFailingClient

func CreateFailingClient() (*opensearchapi.Client, error)

CreateFailingClient returns an opensearchapi.Client that always return 400 with an empty object as body

func VerifyInspect

func VerifyInspect(t *testing.T, inspect opensearchapi.Inspect)

VerifyInspect validates the returned opensearchapi.Inspect type

Types

type DummyInspect

type DummyInspect struct {
	Response *opensearch.Response
}

DummyInspect is a struct to match the Response interface that is used for testing

func (DummyInspect) Inspect

func (r DummyInspect) Inspect() opensearchapi.Inspect

Inspect is a fuction of DummyInspect use to match the Response interface

type Response

type Response interface {
	Inspect() opensearchapi.Inspect
}

Response is a dummy interface to run tests with Inspect()

Jump to

Keyboard shortcuts

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