These are chat archives for aacanakin/qb

1st
Aug 2016
Christophe de Vienne
@cdevienne
Aug 01 2016 14:16
Hi there
I have trouble running the unittests, are they supposed to pass?
Aras Can Akin
@aacanakin
Aug 01 2016 15:42
Hello. You need to create qb_test databases with default dsns for mysql, postgres
Sqlite would create a file automatically
Christophe de Vienne
@cdevienne
Aug 01 2016 15:43
yes I did that. In the mysql db, a user table gets created but the tests still fail
Aras Can Akin
@aacanakin
Aug 01 2016 15:43
Did you check test with -t flags?
Christophe de Vienne
@cdevienne
Aug 01 2016 15:43
nope, will do
actually, which -t flag have you in mind ?
Christophe de Vienne
@cdevienne
Aug 01 2016 15:48
-test.v does not give much more. I will continue digging, I just wanted to be sure those tests are supposed to pass, so I don't my time on that.
Aras Can Akin
@aacanakin
Aug 01 2016 15:48
Sorry the -v flag
go test -v .
Christophe de Vienne
@cdevienne
Aug 01 2016 15:50
here are the last lines when I use -v:
=== RUN   TestMysql
--- FAIL: TestMysql (0.12s)
        Error Trace:    mysql_test.go:51
    Error:        Expected nil, but got: &mysql.MySQLError{Number:0x42b, Message:"Invalid default value for 'expires_at'"}

        Error Trace:    mysql_test.go:69
    Error:        Expected nil, but got: &mysql.MySQLError{Number:0x47a, Message:"Table 'qb_test.session' doesn't exist"}

        Error Trace:    mysql_test.go:76
    Error:        Not equal: "" (expected)
                    != "jack@nicholson.com" (actual)

        Error Trace:    mysql_test.go:77
    Error:        Not equal: "" (expected)
                    != "Jack Nicholson" (actual)

        Error Trace:    mysql_test.go:78
    Error:        Not equal: "" (expected)
                    != "Jack Nicholson, an American actor, producer, screen-writer and director, is a three-time Academy Award winner and twelve-time nominee." (actual)

        Error Trace:    mysql_test.go:87
    Error:        Expected nil, but got: &mysql.MySQLError{Number:0x47a, Message:"Table 'qb_test.session' doesn't exist"}

        Error Trace:    mysql_test.go:88
    Error:        Not equal: 0 (expected)
                    != 1 (actual)

panic: runtime error: index out of range [recovered]
    panic: runtime error: index out of range

goroutine 44 [running]:
panic(0x9ca040, 0xc8200100e0)
    /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
testing.tRunner.func1(0xc82001e090)
    /usr/lib/go-1.6/src/testing/testing.go:467 +0x192
panic(0x9ca040, 0xc8200100e0)
    /usr/lib/go-1.6/src/runtime/panic.go:443 +0x4e9
github.com/aacanakin/qb.(*MysqlTestSuite).TestMysql(0xc820416480)
    /home/cdevienne/ws/ll/golang/src/github.com/aacanakin/qb/mysql_test.go:90 +0x2144
reflect.Value.call(0x902820, 0xa591b8, 0x13, 0xa61f70, 0x4, 0xc820261ef8, 0x1, 0x1, 0x0, 0x0, ...)
    /usr/lib/go-1.6/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x902820, 0xa591b8, 0x13, 0xc820261ef8, 0x1, 0x1, 0x0, 0x0, 0x0)
    /usr/lib/go-1.6/src/reflect/value.go:303 +0xb1
github.com/stretchr/testify/suite.Run.func2(0xc82001e090)
    /home/cdevienne/ws/ll/golang/src/github.com/stretchr/testify/suite/suite.go:95 +0x230
testing.tRunner(0xc82001e090, 0xc8200f5580)
    /usr/lib/go-1.6/src/testing/testing.go:473 +0x98
created by testing.RunTests
    /usr/lib/go-1.6/src/testing/testing.go:582 +0x892
exit status 2
FAIL    github.com/aacanakin/qb    0.168s
Aras Can Akin
@aacanakin
Aug 01 2016 16:28
Seems like there exist a connection problem
Are you sure that mysql server is running?
Aras Can Akin
@aacanakin
Aug 01 2016 16:38
I ll work to reproduce that