Documentation ¶
Index ¶
- Variables
- func GetTestServer(tls bool) (mux *http.ServeMux, teardown func())
- func GetTestingEntity(t *testing.T, entityArgs ...string) (payload *integration.Integration, entity *integration.Entity)
- func GetTestingIntegration(t *testing.T) (payload *integration.Integration)
- func ReadStructFromJSONFile(t *testing.T, filename string, object interface{})
- func ReadStructFromJSONString(t *testing.T, rawJSON string, object interface{})
- type TestLogger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Update flag will update .golden files to the current actual Update = flag.Bool("update", false, "update .golden files") )
Functions ¶
func GetTestServer ¶
GetTestServer creates a test server
func GetTestingEntity ¶
func GetTestingEntity(t *testing.T, entityArgs ...string) (payload *integration.Integration, entity *integration.Entity)
GetTestingEntity creates an Entity used for testing
func GetTestingIntegration ¶
func GetTestingIntegration(t *testing.T) (payload *integration.Integration)
GetTestingIntegration creates an Integration used for testing and sets the logger to the integration's logger
func ReadStructFromJSONFile ¶
ReadStructFromJSONFile Unmarshals the json file into the specified object
func ReadStructFromJSONString ¶
ReadStructFromJSONString reads a generic map[string]interface{} from a json string
Types ¶
type TestLogger ¶
type TestLogger struct {
F func(format string, args ...interface{})
}
TestLogger a logger that logs to a generic format function, used with testing.T.Logf
func (*TestLogger) Debugf ¶
func (l *TestLogger) Debugf(format string, args ...interface{})
Debugf debug format
func (*TestLogger) Errorf ¶
func (l *TestLogger) Errorf(format string, args ...interface{})
Errorf error format
func (*TestLogger) Infof ¶
func (l *TestLogger) Infof(format string, args ...interface{})
Infof info format
func (*TestLogger) Warnf ¶
func (l *TestLogger) Warnf(format string, args ...interface{})
Warnf warning format
Click to show internal directories.
Click to hide internal directories.