export testing
This commit is contained in:
parent
d1f7dcba1b
commit
7f52ef7aad
3
main.go
3
main.go
|
@ -44,12 +44,13 @@ type metadata struct {
|
|||
|
||||
var c config
|
||||
|
||||
func Init(dbin *sqlx.DB, tp, sitename, fromaddr, smtpserver string) {
|
||||
func Init(dbin *sqlx.DB, tp, sitename, fromaddr, smtpserver string, testing bool) {
|
||||
c.db = dbin
|
||||
c.TablePrefix = tp
|
||||
c.SiteName = sitename
|
||||
c.FromEmail = fromaddr
|
||||
c.SMTPServer = smtpserver
|
||||
c.Testing=testing
|
||||
|
||||
SetRegistrationTemplate("")
|
||||
SetAlertTemplate("")
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
func TestUsers(t *testing.T) {
|
||||
var email string
|
||||
c.testing = true
|
||||
c.Testing = true
|
||||
generatePassword(16)
|
||||
flag.StringVar(&email, "email", "", "Email address to use for registration test")
|
||||
flag.Parse()
|
||||
|
|
Loading…
Reference in New Issue