Documentation ¶
Index ¶
- Variables
- func CreateTestDatabase(s string) (*identity.Database, error)
- func EvalErr(t *testing.T, err error, data interface{}, shouldErr bool, expErr error) 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 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 CreateTestDatabase ¶
CreateTestDatabase returns database instance.
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.