Пример #1
0
// Create db with randomly generated name.
// Returns session and database name
func RandomTestMongoUp() (*mgo.Session, string, error) {
	dbName := fmt.Sprintf("%s%s", TestDbPrefix, utils.UuidV4String())
	session, err := PrepareTestDb(fmt.Sprintf("mongodb://localhost/%s", dbName))
	return session, dbName, err
}
Пример #2
0
func UniqueFileId() string {
	return utils.UuidV4String()
}