-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix args passed not exp #295
Conversation
good job |
This was included in a bugfix release but as the author noted it's a breaking change in behaviour. |
As @jameshalsall , this is breaking change as you may very well write tests before v1.5.1 that were not interested in the given arguments but the processing of the result for instance. Could we have something like this to enable this behavior instead ? _, mockDB, _ := sqlmock.New()
mockDB.MatchArgumentsStrict(true) (thank you for the library btw!) |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) | require | patch | `v1.5.0` -> `v1.5.1` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>DATA-DOG/go-sqlmock (github.com/DATA-DOG/go-sqlmock)</summary> ### [`v1.5.1`](https://github.com/DATA-DOG/go-sqlmock/releases/tag/v1.5.1) [Compare Source](https://github.com/DATA-DOG/go-sqlmock/compare/v1.5.0...v1.5.1) Release was tested & verified using [aws-sqk ](https://github.com/aws/aws-xray-sdk-go/pull/450) ##### What's Changed - Add go 1.15 in travis by [@​gold-kou](https://github.com/gold-kou) in [https://github.com/DATA-DOG/go-sqlmock/pull/234](https://github.com/DATA-DOG/go-sqlmock/pull/234) - Update code sample by [@​ashhadsheikh](https://github.com/ashhadsheikh) in [https://github.com/DATA-DOG/go-sqlmock/pull/244](https://github.com/DATA-DOG/go-sqlmock/pull/244) - Fix ExpectedExec Stringer implementation by [@​maguro](https://github.com/maguro) in [https://github.com/DATA-DOG/go-sqlmock/pull/249](https://github.com/DATA-DOG/go-sqlmock/pull/249) - Add Multi Row Support by [@​asahasrabuddhe](https://github.com/asahasrabuddhe) in [https://github.com/DATA-DOG/go-sqlmock/pull/263](https://github.com/DATA-DOG/go-sqlmock/pull/263) - Add Go 1.16 and 1.17 to Travis by [@​gliptak](https://github.com/gliptak) in [https://github.com/DATA-DOG/go-sqlmock/pull/279](https://github.com/DATA-DOG/go-sqlmock/pull/279) - fix package by [@​col3name](https://github.com/col3name) in [https://github.com/DATA-DOG/go-sqlmock/pull/284](https://github.com/DATA-DOG/go-sqlmock/pull/284) - \[Chore]: Add Issue Template by [@​Ghvstcode](https://github.com/Ghvstcode) in [https://github.com/DATA-DOG/go-sqlmock/pull/289](https://github.com/DATA-DOG/go-sqlmock/pull/289) - Fix args passed not exp by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/295](https://github.com/DATA-DOG/go-sqlmock/pull/295) - fixes csv parse errors being silently ignored by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/315](https://github.com/DATA-DOG/go-sqlmock/pull/315) - CSVColParser: correctly set nil values in Rows by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/318](https://github.com/DATA-DOG/go-sqlmock/pull/318) - Modify: existing panic in AddRow to give a hint to the issue by [@​co60ca](https://github.com/co60ca) in [https://github.com/DATA-DOG/go-sqlmock/pull/326](https://github.com/DATA-DOG/go-sqlmock/pull/326) ##### New Contributors - [@​gold-kou](https://github.com/gold-kou) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/234](https://github.com/DATA-DOG/go-sqlmock/pull/234) - [@​ashhadsheikh](https://github.com/ashhadsheikh) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/244](https://github.com/DATA-DOG/go-sqlmock/pull/244) - [@​maguro](https://github.com/maguro) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/249](https://github.com/DATA-DOG/go-sqlmock/pull/249) - [@​asahasrabuddhe](https://github.com/asahasrabuddhe) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/263](https://github.com/DATA-DOG/go-sqlmock/pull/263) - [@​col3name](https://github.com/col3name) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/284](https://github.com/DATA-DOG/go-sqlmock/pull/284) - [@​Ghvstcode](https://github.com/Ghvstcode) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/289](https://github.com/DATA-DOG/go-sqlmock/pull/289) - [@​IvoGoman](https://github.com/IvoGoman) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/295](https://github.com/DATA-DOG/go-sqlmock/pull/295) - [@​co60ca](https://github.com/co60ca) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/326](https://github.com/DATA-DOG/go-sqlmock/pull/326) **Full Changelog**: DATA-DOG/go-sqlmock@v1.5.0...v1.5.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Opened #329 to make this stricter args checking an opt-in. |
…0346) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) | `v1.5.1` -> `v1.5.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.1/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.1/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>DATA-DOG/go-sqlmock (github.com/DATA-DOG/go-sqlmock)</summary> ### [`v1.5.2`](https://github.com/DATA-DOG/go-sqlmock/releases/tag/v1.5.2) [Compare Source](https://github.com/DATA-DOG/go-sqlmock/compare/v1.5.1...v1.5.2) #### What's Changed ##### Fixes breaking change from: [https://github.com/DATA-DOG/go-sqlmock/pull/295](https://github.com/DATA-DOG/go-sqlmock/pull/295) - fix: make no argument passed validation opt-in by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/329](https://github.com/DATA-DOG/go-sqlmock/pull/329) **Full Changelog**: DATA-DOG/go-sqlmock@v1.5.1...v1.5.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
…en-telemetry#30346) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) | `v1.5.1` -> `v1.5.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.1/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.1/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>DATA-DOG/go-sqlmock (github.com/DATA-DOG/go-sqlmock)</summary> ### [`v1.5.2`](https://github.com/DATA-DOG/go-sqlmock/releases/tag/v1.5.2) [Compare Source](https://github.com/DATA-DOG/go-sqlmock/compare/v1.5.1...v1.5.2) #### What's Changed ##### Fixes breaking change from: [https://github.com/DATA-DOG/go-sqlmock/pull/295](https://github.com/DATA-DOG/go-sqlmock/pull/295) - fix: make no argument passed validation opt-in by [@&open-telemetry#8203;IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/329](https://github.com/DATA-DOG/go-sqlmock/pull/329) **Full Changelog**: DATA-DOG/go-sqlmock@v1.5.1...v1.5.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) | `v1.5.0` -> `v1.5.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.0/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fDATA-DOG%2fgo-sqlmock/v1.5.0/v1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>DATA-DOG/go-sqlmock (github.com/DATA-DOG/go-sqlmock)</summary> ### [`v1.5.2`](https://github.com/DATA-DOG/go-sqlmock/releases/tag/v1.5.2) [Compare Source](https://github.com/DATA-DOG/go-sqlmock/compare/v1.5.1...v1.5.2) #### What's Changed ##### Fixes breaking change from: [https://github.com/DATA-DOG/go-sqlmock/pull/295](https://github.com/DATA-DOG/go-sqlmock/pull/295) - fix: make no argument passed validation opt-in by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/329](https://github.com/DATA-DOG/go-sqlmock/pull/329) **Full Changelog**: DATA-DOG/go-sqlmock@v1.5.1...v1.5.2 ### [`v1.5.1`](https://github.com/DATA-DOG/go-sqlmock/releases/tag/v1.5.1) [Compare Source](https://github.com/DATA-DOG/go-sqlmock/compare/v1.5.0...v1.5.1) Release was tested & verified using [aws-sqk ](https://github.com/aws/aws-xray-sdk-go/pull/450) ##### What's Changed - Add go 1.15 in travis by [@​gold-kou](https://github.com/gold-kou) in [https://github.com/DATA-DOG/go-sqlmock/pull/234](https://github.com/DATA-DOG/go-sqlmock/pull/234) - Update code sample by [@​ashhadsheikh](https://github.com/ashhadsheikh) in [https://github.com/DATA-DOG/go-sqlmock/pull/244](https://github.com/DATA-DOG/go-sqlmock/pull/244) - Fix ExpectedExec Stringer implementation by [@​maguro](https://github.com/maguro) in [https://github.com/DATA-DOG/go-sqlmock/pull/249](https://github.com/DATA-DOG/go-sqlmock/pull/249) - Add Multi Row Support by [@​asahasrabuddhe](https://github.com/asahasrabuddhe) in [https://github.com/DATA-DOG/go-sqlmock/pull/263](https://github.com/DATA-DOG/go-sqlmock/pull/263) - Add Go 1.16 and 1.17 to Travis by [@​gliptak](https://github.com/gliptak) in [https://github.com/DATA-DOG/go-sqlmock/pull/279](https://github.com/DATA-DOG/go-sqlmock/pull/279) - fix package by [@​col3name](https://github.com/col3name) in [https://github.com/DATA-DOG/go-sqlmock/pull/284](https://github.com/DATA-DOG/go-sqlmock/pull/284) - \[Chore]: Add Issue Template by [@​Ghvstcode](https://github.com/Ghvstcode) in [https://github.com/DATA-DOG/go-sqlmock/pull/289](https://github.com/DATA-DOG/go-sqlmock/pull/289) - Fix args passed not exp by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/295](https://github.com/DATA-DOG/go-sqlmock/pull/295) - fixes csv parse errors being silently ignored by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/315](https://github.com/DATA-DOG/go-sqlmock/pull/315) - CSVColParser: correctly set nil values in Rows by [@​IvoGoman](https://github.com/IvoGoman) in [https://github.com/DATA-DOG/go-sqlmock/pull/318](https://github.com/DATA-DOG/go-sqlmock/pull/318) - Modify: existing panic in AddRow to give a hint to the issue by [@​co60ca](https://github.com/co60ca) in [https://github.com/DATA-DOG/go-sqlmock/pull/326](https://github.com/DATA-DOG/go-sqlmock/pull/326) ##### New Contributors - [@​gold-kou](https://github.com/gold-kou) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/234](https://github.com/DATA-DOG/go-sqlmock/pull/234) - [@​ashhadsheikh](https://github.com/ashhadsheikh) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/244](https://github.com/DATA-DOG/go-sqlmock/pull/244) - [@​maguro](https://github.com/maguro) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/249](https://github.com/DATA-DOG/go-sqlmock/pull/249) - [@​asahasrabuddhe](https://github.com/asahasrabuddhe) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/263](https://github.com/DATA-DOG/go-sqlmock/pull/263) - [@​col3name](https://github.com/col3name) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/284](https://github.com/DATA-DOG/go-sqlmock/pull/284) - [@​Ghvstcode](https://github.com/Ghvstcode) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/289](https://github.com/DATA-DOG/go-sqlmock/pull/289) - [@​IvoGoman](https://github.com/IvoGoman) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/295](https://github.com/DATA-DOG/go-sqlmock/pull/295) - [@​co60ca](https://github.com/co60ca) made their first contribution in [https://github.com/DATA-DOG/go-sqlmock/pull/326](https://github.com/DATA-DOG/go-sqlmock/pull/326) **Full Changelog**: DATA-DOG/go-sqlmock@v1.5.0...v1.5.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/PingCAP-QE/ee-apps). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuMjAwLjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR changes the behavior in the expectation matching. Previously if no query arg was expected but one was actually passed during query execution the expectations were still met. (Example https://go.dev/play/p/VwF9k6KlET2 ) With this change it is ensured that expected and actual query args do always match.
This should be considered a breaking change as it changes the behavior how expectations are matched and can result in failing unit tests.
I was not able to run the tests locally against go < 1.8. The install of multiple go version mentioned here (https://go.dev/doc/manage-install#installing-multiple) did not work. There seems to be no darwin-arm64 version hosted for 1.7.6
Resolves #292