Documentation ¶
Index ¶
- Constants
- func AssertError(t require.TestingT, actualError error, checks ...ErrorCheck)
- func ExpectRequest(matchers ...gock.MatchFunc) gock.Matcher
- func HasBearerWithSub(sub string) gock.MatchFunc
- func HasBodyContainingObject(object map[interface{}]interface{}) gock.MatchFunc
- func HasJWTWithSub(sub string) gock.MatchFunc
- func LoadTestConfig(t *testing.T) (*configuration.Data, func())
- func NewToken(claims map[string]interface{}, privatekeyFilename string) (*jwt.Token, error)
- func Normalize(url string) string
- func PrivateKey(filename string) (*rsa.PrivateKey, error)
- func PublicKey(filename string) (*rsa.PublicKey, error)
- func SetEnvironments(environments ...Environment) func()
- func SpyOnCalls(counter *int) gock.Matcher
- func SpyOnCallsMatchFunc(counter *int) gock.MatchFunc
- type Awaitility
- type Environment
- type ErrorCheck
- type RequestMatcher
Constants ¶
View Source
const ClusterURL = "http://api.cluster1"
Variables ¶
This section is empty.
Functions ¶
func AssertError ¶
func AssertError(t require.TestingT, actualError error, checks ...ErrorCheck)
func ExpectRequest ¶
func ExpectRequest(matchers ...gock.MatchFunc) gock.Matcher
func HasBearerWithSub ¶
func HasBearerWithSub(sub string) gock.MatchFunc
func HasBodyContainingObject ¶
func HasBodyContainingObject(object map[interface{}]interface{}) gock.MatchFunc
func HasJWTWithSub ¶
func HasJWTWithSub(sub string) gock.MatchFunc
func LoadTestConfig ¶
func LoadTestConfig(t *testing.T) (*configuration.Data, func())
func NewToken ¶
NewToken creates a new JWT using the given sub claim and signed with the private key in the given filename
func PrivateKey ¶
func PrivateKey(filename string) (*rsa.PrivateKey, error)
PrivateKey returns the PrivateKey from the given filename
func SetEnvironments ¶
func SetEnvironments(environments ...Environment) func()
func SpyOnCallsMatchFunc ¶
func SpyOnCallsMatchFunc(counter *int) gock.MatchFunc
Types ¶
type Awaitility ¶
type Awaitility struct {
// contains filtered or unexported fields
}
func WaitWithTimeout ¶
func WaitWithTimeout(timeout time.Duration) Awaitility
func (Awaitility) Until ¶
func (a Awaitility) Until(do func() error) error
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func Env ¶
func Env(key, value string) Environment
type ErrorCheck ¶
func HasMessage ¶
func HasMessage(expectedMsg string, args ...interface{}) ErrorCheck
func HasMessageContaining ¶
func HasMessageContaining(expectedMsg string, args ...interface{}) ErrorCheck
func IsOfType ¶
func IsOfType(expectedType interface{}) ErrorCheck
type RequestMatcher ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.