func CreateTestIdentity(db *gorm.DB, username, providerType string) (account.Identity, error) {
	identityRepository := account.NewIdentityRepository(db)
	testIdentity := account.Identity{
		Username:     username,
		ProviderType: providerType,
	}
	err := models.Transactional(db, func(tx *gorm.DB) error {
		return identityRepository.Create(context.Background(), &testIdentity)
	})
	logrus.Info("Created identity with id=", testIdentity.ID.String())
	return testIdentity, err
}
// CreateTestIdentity creates an identity with the given `username` in the database. For testing purpose only.
CreateTestIdentity creates an identity with the given `username` in the database. For testing purpose only.
// CreateTestIdentity creates an identity with the given ` username ` in the database . For testing purpose only .
func CreateTestIdentity(db *gorm.DB, username, providerType string) (account.Identity, error) {
	identityRepository := account.NewIdentityRepository(db)
	testIdentity := account.Identity{
		Username:     username,
		ProviderType: providerType,
	}
	err := models.Transactional(db, func(tx *gorm.DB) error {
		return identityRepository.Create(context.Background(), &testIdentity)
	})
	logrus.Info("Created identity with id=", testIdentity.ID.String())
	return testIdentity, err
}
func CreateTestIdentity ( db * gorm . DB , username , providerType string ) ( account . Identity , error ) { identityRepository := account . NewIdentityRepository ( db ) testIdentity := account . Identity { Username : username , ProviderType : providerType , } err := models . Transactional ( db , func ( tx * gorm . DB ) error { return identityRepository . Create ( context . Background ( ) , & testIdentity ) } ) logrus . Info ( " " , testIdentity . ID . String ( ) ) return testIdentity , err }
CreateTestIdentity creates an identity with the given `username` in the database.
CreateTestIdentity creates an identity with the given ` username ` in the database .