1
0
mirror of https://github.com/zhashkevych/go-sqlxmock.git synced 2024-11-24 08:12:13 +02:00
Commit Graph

205 Commits

Author SHA1 Message Date
Camal Cakar
b03ef5f2a4
Update expectations.go
Case sensitivity update for comments.
2019-02-18 18:42:21 +01:00
gedi
dfdf60c043
update travis config 2019-02-13 09:34:40 +02:00
gedi
08cb21bb55
closes #161 removes references to gopkg.in 2019-02-13 09:29:47 +02:00
gedi
472e287dba
fixes the go module name 2019-02-12 15:25:38 +02:00
gedi
4076b744ea
add go.mod, closes #160 2019-02-12 14:31:14 +02:00
Gediminas Morkevicius
2a5889fc86
Merge pull request #151 from darwish/master
adds missing lock around e.fulfilled() in ExpectationsWereMet()
2018-12-21 10:51:09 +02:00
Michael Darwish
e671f177c0 adds missing lock around e.fulfilled() in ExpectationsWereMet() 2018-12-20 13:00:51 -05:00
gedi
f7b0b9305b
closes #114 allow expecting rows to be closed 2018-12-11 17:38:12 +02:00
gedi
a6e6646ad9
use configured QueryMatcher in order to match expected SQL to actual, closes #70 2018-12-11 15:20:44 +02:00
gedi
2a15d9c09b
add QueryMatcher interface for customizing SQL matching 2018-12-11 14:22:16 +02:00
Gediminas Morkevicius
e4e10ddf73
Merge pull request #147 from gliptak/gofmt1
Gofmt sqlmock_test.go
2018-10-21 23:12:15 +03:00
Gábor Lipták
c6bf1c0f76
Gofmt sqlmock_test.go
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2018-10-20 15:47:49 -04:00
Gediminas Morkevicius
d4b2bccf3e
Merge pull request #134 from nineinchnick/custom-converter
Allow to use a custom converter
2018-09-14 13:42:08 +03:00
Jan Was
168056e96a move options to a separate file 2018-09-14 11:03:24 +02:00
gedi
4eed5ba1a0
add latest go version to travis build 2018-09-08 19:12:32 +03:00
Jan Waś
3cbf32d5e7 more tests 2018-08-06 23:07:17 +02:00
Jan Waś
298bfde310 add tests 2018-08-06 22:59:44 +02:00
Jan Waś
aaceb21fbd use custom converter only in newer go 2018-08-06 22:49:41 +02:00
Jan Waś
3d31483014 add comment to CheckNamedValue 2018-08-06 22:41:15 +02:00
Jan Waś
f2bc8f904e allow to use a custom converter 2018-08-06 22:29:24 +02:00
gedi
c8e01dc244
custom driver value mocking #131 2018-08-03 22:46:48 +03:00
Gediminas Morkevicius
852fc940e4
Merge pull request #129 from dolmen/apply-ParameterConverter-on-Row-values
Apply parameter converter on row values
2018-07-20 11:32:39 +03:00
Olivier Mengué
92e5f46c1c tests/NullInt.Scan: remove support for int{,8,16,32}
Those types are not driver.Value, but int was necessary because sqlmock
was not properly using pure driver.Value before. Now that I fixed the
issue in previous commit, we can remove the old hack.
2018-07-12 16:03:36 +02:00
Olivier Mengué
896b89a023 Rows.AddRow(): enforce conversion to driver.Value when building row 2018-07-12 15:54:57 +02:00
Gediminas Morkevicius
4d2035c879
Merge pull request #128 from dolmen/improve-Travis-CI
Use gopkg.in import path for Travis and examples
2018-07-12 16:15:28 +03:00
Gediminas Morkevicius
5e7c2fba63
Merge pull request #127 from dolmen/fix-test-NullInt
testsuite: fixes in NullInt/NullTime
2018-07-12 16:08:31 +03:00
Olivier Mengué
5c0fec018b tests/NullInt.Scan: add FIXME about removing int{,8,16,32} input support
The input of Scan is a driver.Value. Which means the only integer type
on input is a int64. But NullInt.Scan also handles int/int8/int16/int32
while that should not be necessary.

Unfortunately, sqlmock doesn't enforce strict driver.Value in its
implementation and the testsuite (that uses NullInt) relies on this bug.

So, this patch just adds a FIXME until sqlmock internals and testsuite
are fixed (will maybe require breaking the API).
2018-07-12 15:00:04 +02:00
Olivier Mengué
87bbc72050 tests/Null{Int,Time}: do not change the value in case of error
Do not touch the existing value in case of error.
No capital on error message.
2018-07-12 15:00:04 +02:00
Olivier Mengué
9119b1dbff tests/Null{Int,Time}: refactor Scan for less lines of code
Single switch for all cases.
Single return for the success case.
2018-07-12 15:00:04 +02:00
Olivier Mengué
f974ac3c0c tests/NullInt: fix Value() to return a valid driver.Value
Value must return int64, not int.
2018-07-12 15:00:04 +02:00
Olivier Mengué
4f574cddfd tests/NullInt: fix Scan from string/[]byte
Do not change the value if Atoi fails
2018-07-12 15:00:04 +02:00
Olivier Mengué
c1f08b2bb1 tests/NullInt.Scan: fix integer conversion from int{8,16,32,64} 2018-07-12 15:00:04 +02:00
Olivier Mengué
3af22b4a29 Use gopkg.in import path in examples and Travis 2018-07-12 14:57:57 +02:00
Olivier Mengué
ad9241832e Travis-CI: we don't need sudo 2018-07-12 14:32:58 +02:00
gedi
b9ca56ce96
add go1.10 in travis 2018-03-04 17:30:57 +02:00
Gediminas Morkevicius
a6b4b164c6
Merge pull request #110 from markuswrnp/wait-error
delay for WillDelayFor() duration, before returning error set by WillReturnError()
2018-02-21 09:21:20 +02:00
Wachowski
32675e3ad1 delay for WillDelayFor() duration, before returning error set by WillReturnError()
If both WillDelayFor() and WillReturnError() are called, there should
be a delay before the error is returned.  Applied to Begin, Exec,
Query, and Prepare.  Also, the context versions of same.

And a couple of unit tests.
2018-02-20 17:30:20 -07:00
Gediminas Morkevicius
a7b3087be7
Merge pull request #101 from gliptak/patch-1
Add GoReportCard badge to README
2017-11-27 10:00:01 +02:00
Gediminas Morkevicius
710c1a61f5
Merge pull request #102 from gliptak/spell1
Correct spelling
2017-11-27 09:57:17 +02:00
Gábor Lipták
395520ee2d
Correct spelling
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2017-11-25 09:32:17 -05:00
Gábor Lipták
1224f73cf9
Add GoReportCard badge to README 2017-11-25 09:25:54 -05:00
gedi
08090c7d68
adds go 1.9.x to be run in travis CI 2017-10-04 17:32:19 +03:00
gedi
d76b18b42f
fixes new feature for > 1.8 go versions 2017-09-01 10:34:10 +03:00
gedi
9d03611ad1
allow to expect prepared statement to be closed, closes #89 2017-09-01 10:24:02 +03:00
Gediminas Morkevicius
c91a7f4b68 Merge pull request #87 from whiteheadrj/master
Fixed GoDoc spelling error
2017-08-03 09:15:24 +03:00
RJ
bfd9a9de56 Fixed spelling error 2017-08-02 21:09:34 -04:00
gedi
d335ff60c1
fixes travis build with gofmt 2017-06-02 11:59:07 +03:00
gedi
b2ca44a80b
updates travis to validate with go fmt 2017-05-31 23:54:14 +03:00
gedi
d1ba2809d5
travis run 1.4 instead of latest, because it has no cover tool 2017-05-31 10:20:00 +03:00
gedi
4d1a16152a
travis runs tip instead of master 2017-05-31 10:12:33 +03:00