osapitest

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareRawJSONwithParsedJSON

func CompareRawJSONwithParsedJSON(t *testing.T, resp any, rawResp *opensearch.Response)

CompareRawJSONwithParsedJSON is a helper function to determin the difference between the parsed JSON and the raw JSON this is helpful to detect missing fields in the go structs

func CreateFailingClient

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

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

func SkipIfBelowVersion

func SkipIfBelowVersion(t *testing.T, client *opensearchapi.Client, majorVersion, patchVersion int64, testName string)

SkipIfBelowVersion skips a test if the cluster version is below a given version

func VerifyInspect

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

VerifyInspect validates the returned opensearchapi.Inspect type

Types

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