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
|
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.db = dbin
|
||||||
c.TablePrefix = tp
|
c.TablePrefix = tp
|
||||||
c.SiteName = sitename
|
c.SiteName = sitename
|
||||||
c.FromEmail = fromaddr
|
c.FromEmail = fromaddr
|
||||||
c.SMTPServer = smtpserver
|
c.SMTPServer = smtpserver
|
||||||
|
c.Testing=testing
|
||||||
|
|
||||||
SetRegistrationTemplate("")
|
SetRegistrationTemplate("")
|
||||||
SetAlertTemplate("")
|
SetAlertTemplate("")
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
func TestUsers(t *testing.T) {
|
func TestUsers(t *testing.T) {
|
||||||
var email string
|
var email string
|
||||||
c.testing = true
|
c.Testing = true
|
||||||
generatePassword(16)
|
generatePassword(16)
|
||||||
flag.StringVar(&email, "email", "", "Email address to use for registration test")
|
flag.StringVar(&email, "email", "", "Email address to use for registration test")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
Loading…
Reference in New Issue