Skip to content

Reject conflicting exec argument expectations - #355

Open
Bolt4243 wants to merge 3 commits into
DATA-DOG:masterfrom
Bolt4243:fix_exec_without_args_guard
Open

Reject conflicting exec argument expectations#355
Bolt4243 wants to merge 3 commits into
DATA-DOG:masterfrom
Bolt4243:fix_exec_without_args_guard

Conversation

@Bolt4243

@Bolt4243 Bolt4243 commented Sep 9, 2026

Copy link
Copy Markdown

ExpectedExec.WithArgs checked whether arguments were already stored instead of checking the WithoutArgs flag. Calling WithoutArgs().WithArgs("paid") therefore created a contradictory expectation, while the reverse order correctly panicked.

Check the flag directly, matching ExpectedQuery, and cover the reversed call order.

The focused offline Go test fails on the base commit with no panic and passes with this change. The full package test suite was not run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants