ostest

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientConfig

func ClientConfig() (*opensearchapi.Config, error)

ClientConfig returns an opensearchapi.Config for secure opensearch

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 GetPassword

func GetPassword() (string, error)

GetPassword returns the password suited for the opensearch version

func GetVersion

func GetVersion(client *opensearchapi.Client) (int64, int64, int64, error)

GetVersion gets cluster info and returns version as int's

func IsSecure

func IsSecure() bool

IsSecure returns true when SECURE_INTEGRATION env is set to true

func NewClient

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

NewClient returns an opensearchapi.Client that is adjusted for the wanted test case

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 SkipIfNotSecure

func SkipIfNotSecure(t *testing.T)

SkipIfNotSecure skips a test runs against an unsecure cluster

Types

This section is empty.

Jump to

Keyboard shortcuts

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