1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-01-05 22:53:26 +02:00

updates travis to validate with go fmt

This commit is contained in:
gedi 2017-05-31 23:54:14 +03:00
parent d1ba2809d5
commit b2ca44a80b
No known key found for this signature in database
GPG Key ID: 56604CDCCC201556
4 changed files with 13 additions and 11 deletions

View File

@ -8,9 +8,12 @@ go:
- 1.6.x
- 1.7.x
- 1.8.x
- tip
# - tip # sadly fails most of thw times
script: go test -race -coverprofile=coverage.txt -covermode=atomic
script:
- go vet
- test -z "$(go fmt ./...)" # fail if not formatted properly
- go test -race -coverprofile=coverage.txt -covermode=atomic
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -354,7 +354,6 @@ func TestPreparedQueryExecutions(t *testing.T) {
}
}
func TestUnorderedPreparedQueryExecutions(t *testing.T) {
t.Parallel()
db, mock, err := New()
@ -369,14 +368,14 @@ func TestUnorderedPreparedQueryExecutions(t *testing.T) {
ExpectQuery().
WithArgs(5).
WillReturnRows(
NewRows([]string{"id", "title"}).FromCSVString("5,The quick brown fox"),
)
NewRows([]string{"id", "title"}).FromCSVString("5,The quick brown fox"),
)
mock.ExpectPrepare("SELECT (.+) FROM authors WHERE id = ?").
ExpectQuery().
WithArgs(1).
WillReturnRows(
NewRows([]string{"id", "title"}).FromCSVString("1,Betty B."),
)
NewRows([]string{"id", "title"}).FromCSVString("1,Betty B."),
)
var id int
var name string