util

package
v0.0.0-...-7f2155d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(out, model []byte) error

Compare compares two byte slices. It returns an error with a contextual diff if they are not equal.

func CompareFiles

func CompareFiles(outFile, modelFile string) error

CompareFiles compares the content of two files

func CompareHTTPResponse

func CompareHTTPResponse(body []byte, modelFile string) error

CompareHTTPResponse compares a HTTP Response body with a model HTML file modelFile is the file name. Not the file path. resources directory is github.com/maistra/maistra-test-tool/testdata/resources

func CompareToFile

func CompareToFile(out []byte, modelFile string) error

CompareToFile compares a content with a file

func GenerateStrings

func GenerateStrings(prefix string, count int) []string

func IsWithinPercentage

func IsWithinPercentage(count int, total int, rate float64, tolerance float64) bool

func NewNonce

func NewNonce() string

func SetupCookieJar

func SetupCookieJar(username, pass, gateway string) (*cookiejar.Jar, error)

SetupCookieJar sends http post request with user login

Types

This section is empty.

Jump to

Keyboard shortcuts

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