Adjustments

This commit is contained in:
scs
2018-12-27 22:09:23 +00:00
parent 6747d68177
commit b38f59e475
3 changed files with 29 additions and 11 deletions

Binary file not shown.

View File

@@ -15,7 +15,7 @@ func main() {
flag.StringVar(&email, "email", "", "Email address to use for registration test")
flag.Parse()
db, err:=sqlx.Open("sqlite3", ":memory")
db, err:=sqlx.Open("sqlite3", ":memory:")
if err!=nil {
fmt.Println("Couldn't open sqlite3 in-memory db:" + err.Error())
os.Exit(1)
@@ -27,11 +27,13 @@ func main() {
os.Exit(1)
}
schema:=`CREATE TABLE test_auth (
username text NOT NULL unique key ,
crypt text NOT NULL,
email text NOT NULL unique key,
username text NOT NULL ,
password text NOT NULL,
email text NOT NULL unique,
recovery text NOT NULL DEFAULT '',
recoverytime timestamp null,
registration_date timestamp not null,
registration_ip text not null,
lastseen timestamp );`
_ ,err=db.Exec(schema)
if err != nil {