helpers

package
v1.10.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecInContainer

func ExecInContainer(container string, command []string, envVars ...string) (string, string, error)

ExecInContainer executes the given command inside the specified container. It returns three values: 1st - Standard Output 2nd - Standard Error 3rd - Runtime error, if any

func GetTestName

func GetTestName(t *testing.T) interface{}

GetTestName returns the name of the running test.

func ModifyJSONSchemaGlobal

func ModifyJSONSchemaGlobal(schema *simplejson.Json, integrationName string, protocolVersion int, integrationVersion string) error

ModifyJSONSchemaGlobal modifies JSON schema by adding patterns elements for integration name, protocol version and integration version

func ModifyJSONSchemaInventoryPresent

func ModifyJSONSchemaInventoryPresent(schema *simplejson.Json) error

ModifyJSONSchemaInventoryPresent modifies JSON schema by adding required elements for inventory JSON schema

func ModifyJSONSchemaMetricsPresent

func ModifyJSONSchemaMetricsPresent(schema *simplejson.Json, eventType string) error

ModifyJSONSchemaMetricsPresent modifies JSON schema by adding required elements for metrics JSON schema

func ModifyJSONSchemaNoInventory

func ModifyJSONSchemaNoInventory(schema *simplejson.Json) error

ModifyJSONSchemaNoInventory modifies JSON schema by adding required elements assuring that no inventory data exists in the integration output

func ModifyJSONSchemaNoMetrics

func ModifyJSONSchemaNoMetrics(schema *simplejson.Json) error

ModifyJSONSchemaNoMetrics modifies JSON schema by adding required elements assuring that no metrics data exists in the integration output

func ValidateJSONSchema deprecated

func ValidateJSONSchema(schemaJsonFileName string, input string) error

ValidateJSONSchema validates the input argument against JSON schema. If the input is not valid the error is returned. The first argument is the file name (without .json extension) of the JSON schema. It is used to build file URI required to load the JSON schema. The second argument is the input string that is validated.

Deprecated: This function is deprecated. Instead, use Validate function from jsonschema package

func WaitForPort

func WaitForPort(fromContainer, host string, port int, timeout time.Duration) error

WaitForPort waits for a host:port to be accessible inside a container

Types

This section is empty.

Jump to

Keyboard shortcuts

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