Documentation ¶
Index ¶
- Variables
- func CustomEvalObjectsWithLog(t *testing.T, name string, want, got interface{}, msgs []string, ...)
- func EvalErr(t *testing.T, err error, data interface{}, shouldErr bool, expErr error) bool
- func EvalErrPhaseWithLog(t *testing.T, err error, errPhase, expErrPhase string, shouldErr bool, ...) bool
- func EvalErrWithLog(t *testing.T, err error, data interface{}, shouldErr bool, expErr error, ...) bool
- func EvalObjects(t *testing.T, name string, want, got interface{})
- func EvalObjectsWithLog(t *testing.T, name string, want, got interface{}, msgs []string)
- func GetCryptoKeyPair(t *testing.T, keyAlgo, publicKeyType string) (string, string)
- func NewID() string
- func NewRandomString(length int) string
- func TempDir(s string) (string, error)
- func Unpack(t *testing.T, i interface{}) (m map[string]interface{})
- func UnpackJSON(t *testing.T, m map[string]interface{}) string
- func WriteLog(t *testing.T, msgs []string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TestUser1 is the username for user1. TestUser1 = "jsmith" // TestEmail1 is the email for user1. TestEmail1 = "jsmith@gmail.com" // TestPwd1 is the password for user1. TestPwd1 = NewRandomString(12) // TestFullName1 is the full name for user1. TestFullName1 = "Smith, John" // TestRoles1 is the roles for user1. TestRoles1 = []string{"viewer", "editor", "admin", "authp/admin"} // TestUser2 is the username for user2. TestUser2 = "bjones" // TestEmail2 is the email for user2. TestEmail2 = "bjones@gmail.com" // TestPwd2 is the password for user2. TestPwd2 = NewRandomString(16) // TestFullName2 is the full name for user2. TestFullName2 = "" // TestRoles2 is the roles for user2. TestRoles2 = []string{"viewer"} )
Functions ¶
func CustomEvalObjectsWithLog ¶
func CustomEvalObjectsWithLog(t *testing.T, name string, want, got interface{}, msgs []string, typs interface{})
CustomEvalObjectsWithLog compares two objects and logs extra output when detects an error.
func EvalErrPhaseWithLog ¶
func EvalErrPhaseWithLog(t *testing.T, err error, errPhase, expErrPhase string, shouldErr bool, expErr error, msgs []string) bool
EvalErrPhaseWithLog evaluates the error according to the phase of execution.
func EvalErrWithLog ¶
func EvalErrWithLog(t *testing.T, err error, data interface{}, shouldErr bool, expErr error, msgs []string) bool
EvalErrWithLog evaluates the error.
func EvalObjects ¶
EvalObjects compares two objects.
func EvalObjectsWithLog ¶
EvalObjectsWithLog compares two objects and logs extra output when detects an error.
func GetCryptoKeyPair ¶
GetCryptoKeyPair returns private-public key pair.
func NewRandomString ¶
NewRandomString returns a random string.
func UnpackJSON ¶
UnpackJSON converts a map to a JSON string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.