{"action":"created","issue":{"url":"https://api.github.com/repos/gobuffalo/buffalo/issues/489","repository_url":"https://api.github.com/repos/gobuffalo/buffalo","labels_url":"https://api.github.com/repos/gobuffalo/buffalo/issues/489/labels{/name}","comments_url":"https://api.github.com/repos/gobuffalo/buffalo/issues/489/comments","events_url":"https://api.github.com/repos/gobuffalo/buffalo/issues/489/events","html_url":"https://github.com/gobuffalo/buffalo/issues/489","id":240258424,"number":489,"title":"New project tests fail (on buffalo 0.9.0)","user":{"login":"alexcarol","id":1713440,"avatar_url":"https://avatars0.githubusercontent.com/u/1713440?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcarol","html_url":"https://github.com/alexcarol","followers_url":"https://api.github.com/users/alexcarol/followers","following_url":"https://api.github.com/users/alexcarol/following{/other_user}","gists_url":"https://api.github.com/users/alexcarol/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcarol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcarol/subscriptions","organizations_url":"https://api.github.com/users/alexcarol/orgs","repos_url":"https://api.github.com/users/alexcarol/repos","events_url":"https://api.github.com/users/alexcarol/events{/privacy}","received_events_url":"https://api.github.com/users/alexcarol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-03T20:23:58Z","updated_at":"2017-07-03T20:35:20Z","closed_at":null,"body":"Steps to reproduce:\r\nbuffalo new test --db-type mysql\r\nbuffalo test\r\n\r\nResult:\r\n```\r\n➜  test go test github.com/alexcarol/test github.com/alexcarol/test/actions github.com/alexcarol/test/grifts github.com/alexcarol/test/models     \r\n\r\n?       github.com/alexcarol/test       [no test files]\r\n[POP] 2017/07/03 21:33:39 SELECT concat('TRUNCATE TABLE `', TABLE_NAME, '`;') as stmt FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = ? | [\"test_test\"]\r\n--- FAIL: Test_HomeHandler (0.00s)\r\npanic: runtime error: invalid memory address or nil pointer dereference [recovered]\r\n        panic: runtime error: invalid memory address or nil pointer dereference\r\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x982238]\r\n\r\ngoroutine 11 [running]:\r\ntesting.tRunner.func1(0xc420234d00)\r\n        /usr/local/go/src/testing/testing.go:622 +0x29d\r\npanic(0xb22ee0, 0x1129040)\r\n        /usr/local/go/src/runtime/panic.go:489 +0x2cf\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*Model).TableName(0x0, 0x0, 0x0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/model.go:115 +0x38\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*sqlBuilder).buildColumns(0xc42048e000, 0x0, 0x0, 0x0, 0x0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/sql_builder.go:156 +0x47\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*sqlBuilder).buildSelectSQL(0xc42048e000, 0x0, 0x0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/sql_builder.go:66 +0x40\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*sqlBuilder).compile(0xc42048e000)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/sql_builder.go:52 +0x29b\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*sqlBuilder).String(0xc42048e000, 0x0, 0x0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/sql_builder.go:31 +0x59\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.Query.ToSQL(0xc420484120, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/query.go:93 +0xb9\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*Query).Exec.func1(0xed0ec9313, 0x2d04fc33)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/executors.go:18 +0x96\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*Connection).timeFunc(0xc420214ac0, 0xbcb700, 0x4, 0xc420183d78, 0x0, 0x0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/connection.go:175 +0x51\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*Query).Exec(0xc42048c000, 0x0, 0x0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/executors.go:22 +0x6b\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*mysql).TruncateAll(0xc42000e950, 0xc420214ac0, 0xb1dd01, 0xc420231eb0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/mysql.go:154 +0x309\r\ngithub.com/alexcarol/test/vendor/github.com/markbates/pop.(*Connection).TruncateAll(0xc420214ac0, 0xc420231eb0, 0xb5aa20)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/markbates/pop/connection.go:170 +0x3c\r\ngithub.com/alexcarol/test/vendor/github.com/gobuffalo/suite.(*Model).SetupTest(0xc420233020)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/gobuffalo/suite/model.go:19 +0x9d\r\ngithub.com/alexcarol/test/vendor/github.com/gobuffalo/suite.(*Action).SetupTest(0xc4202330e0)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/gobuffalo/suite/suite.go:47 +0x160\r\ngithub.com/alexcarol/test/vendor/github.com/stretchr/testify/suite.Run.func2(0xc420234d00)\r\n        /home/alex/go/src/github.com/alexcarol/test/vendor/github.com/stretchr/testify/suite/suite.go:87 +0x1b2\r\ntesting.tRunner(0xc420234d00, 0xc4203f0690)\r\n        /usr/local/go/src/testing/testing.go:657 +0x96\r\ncreated by testing.(*T).Run\r\n        /usr/local/go/src/testing/testing.go:697 +0x2ca\r\nFAIL    github.com/alexcarol/test/actions       0.012s\r\n?       github.com/alexcarol/test/grifts        [no test files]\r\nok      github.com/alexcarol/test/models        0.007s [no tests to run]\r\n\r\n```\r\nIt looks like the issue is originated in markbates/pop executors.go file, where nil is passed to q.ToSQL, but i'm not sure how to address it.\r\n```\r\n\r\nfunc (q *Query) Exec() error {\r\n\treturn q.Connection.timeFunc(\"Exec\", func() error {\r\n\t\tsql, args := q.ToSQL(nil)\r\n\t\tLog(sql, args...)\r\n\t\t_, err := q.Connection.Store.Exec(sql, args...)\r\n\t\treturn err\r\n\t})\r\n}\r\n\r\n```\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/gobuffalo/buffalo/issues/comments/312729134","html_url":"https://github.com/gobuffalo/buffalo/issues/489#issuecomment-312729134","issue_url":"https://api.github.com/repos/gobuffalo/buffalo/issues/489","id":312729134,"user":{"login":"markbates","id":3528,"avatar_url":"https://avatars0.githubusercontent.com/u/3528?v=3","gravatar_id":"","url":"https://api.github.com/users/markbates","html_url":"https://github.com/markbates","followers_url":"https://api.github.com/users/markbates/followers","following_url":"https://api.github.com/users/markbates/following{/other_user}","gists_url":"https://api.github.com/users/markbates/gists{/gist_id}","starred_url":"https://api.github.com/users/markbates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markbates/subscriptions","organizations_url":"https://api.github.com/users/markbates/orgs","repos_url":"https://api.github.com/users/markbates/repos","events_url":"https://api.github.com/users/markbates/events{/privacy}","received_events_url":"https://api.github.com/users/markbates/received_events","type":"User","site_admin":false},"created_at":"2017-07-03T20:35:20Z","updated_at":"2017-07-03T20:35:20Z","body":"I'm unable to reproduce this.\r\n\r\n```\r\n$ buffalo new test --db-type mysql\r\n$ buffalo test\r\n\r\nBuffalo version v0.9.0\r\n\r\ndropped database test_test\r\ncreated database test_test\r\nmysqldump: [Warning] Using a password on the command line interface can be insecure.\r\nmysqldump: Got error: 1049: Unknown database 'test_development' when selecting the database\r\n\r\n0.3187 seconds\r\ngo test -p 1 github.com/markbates/test github.com/markbates/test/actions github.com/markbates/test/grifts github.com/markbates/test/models\r\n?   \tgithub.com/markbates/test\t[no test files]\r\nok  \tgithub.com/markbates/test/actions\t0.061s\r\n?   \tgithub.com/markbates/test/grifts\t[no test files]\r\nok  \tgithub.com/markbates/test/models\t0.030s [no tests to run]\r\n```\r\n\r\nIs there anything else you're leaving out that could help me reproduce? Any steps you forgot to mention? What version of Go are you using? What does your `Gopkg.lock` file look like (if you have one). What OS are you on? Version of MySQL, etc..."}}
{"actor":{"display_login":"markbates"}}