Documentation
¶
Index ¶
- func CreateMockClient[T any](t *testing.T, createFunc func(*http.Client) T) *T
- func MockRequestBodyValidate(t *testing.T, expected any, response any) httpmock.Responder
- func MockRequestBodyValidateNoBody(t *testing.T, response any) httpmock.Responder
- func MockRequestURL(path string) *regexp.Regexp
- type Logger
- type TestLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMockClient ¶
CreateMockClient is generic because importing the linodego package will result in a cyclic dependency. This pattern isn't ideal but works for now.
func MockRequestBodyValidate ¶
func MockRequestURL ¶
Types ¶
type TestLogger ¶ added in v1.34.0
func CreateLogger ¶ added in v1.34.0
func CreateLogger() *TestLogger
func (*TestLogger) Debugf ¶ added in v1.34.0
func (l *TestLogger) Debugf(format string, v ...any)
func (*TestLogger) Errorf ¶ added in v1.34.0
func (l *TestLogger) Errorf(format string, v ...any)
func (*TestLogger) Warnf ¶ added in v1.34.0
func (l *TestLogger) Warnf(format string, v ...any)
Click to show internal directories.
Click to hide internal directories.