export testing

This commit is contained in:
Your Name 2024-01-02 10:15:57 -05:00
parent d1f7dcba1b
commit 7f52ef7aad
2 changed files with 3 additions and 2 deletions

View File

@ -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("")

View File

@ -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()