test_helpers

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertJSONExamplesForObject

func AssertJSONExamplesForObject(t *testing.T, jsonString, fieldName string, expectedExamples map[string]any)

func AssertJSONExamplesForObjectsInAnArray

func AssertJSONExamplesForObjectsInAnArray(t *testing.T, jsonString, fieldName string, expectedExamples map[string]any)

func AssertJSONHasArrayWithObject

func AssertJSONHasArrayWithObject(t *testing.T, jsonString string, fieldName string, requiredKeys []string)

func AssertJSONHasObject

func AssertJSONHasObject(t *testing.T, jsonString string, fieldName string, requiredKeys []string)

func AssertJSONHasXAmountOfArrays

func AssertJSONHasXAmountOfArrays(t *testing.T, jsonString string, expectedArrayAmount int)

func AssertJSONHasXAmountOfObjects

func AssertJSONHasXAmountOfObjects(t *testing.T, jsonString string, expectedObjAmount int)

func ExtractBody

func ExtractBody(jsonWithHeaders string) (string, error)

func ExtractHeaders

func ExtractHeaders(t *testing.T, result string) (map[string]string, error)

func SetupGenRequestTest added in v0.7.0

func SetupGenRequestTest(t *testing.T, testFileName string, testFileContentPath string, args ...string) (*cobra.Command, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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