Skip to content
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

tests(*): http mock support specifying customized init_by_lua_block code #11331

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

windmgc
Copy link
Member

@windmgc windmgc commented Jul 31, 2023

Summary

This commits has two changes:

  • Let http mock support specifying customized init_by_lua_block code
  • Fix the global patched assert function behavior to keep it same as the original one.

I'm writing some tests for the EE project and it will be useful if we can specify customized init code to run some code at init phase.

Checklist

Full changelog

  • [Implement ...]

Issue reference

Fix #[issue number]

@windmgc windmgc requested a review from StarlightIbuki July 31, 2023 08:24
@windmgc windmgc force-pushed the tests-http-mock-support-init-block branch from 28faffe to a1e1fd8 Compare July 31, 2023 08:25
This commits has two changes:
- Let http mock support specifying customized init_by_lua_block code
- Fix the global patched assert function behavior to keep it same as the
  original one.
@windmgc windmgc force-pushed the tests-http-mock-support-init-block branch from a1e1fd8 to 97ed3c4 Compare July 31, 2023 08:29
Copy link
Contributor

@StarlightIbuki StarlightIbuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add tests for this new change.
Could you elaborate on why we need this?

spec/helpers/http_mock/template.lua Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jul 31, 2023
@windmgc windmgc force-pushed the tests-http-mock-support-init-block branch 2 times, most recently from 6eddf3b to ffe3b7a Compare July 31, 2023 15:00
@windmgc windmgc force-pushed the tests-http-mock-support-init-block branch from ffe3b7a to 2e72981 Compare July 31, 2023 15:16
@windmgc
Copy link
Member Author

windmgc commented Aug 1, 2023

test added.

@windmgc windmgc force-pushed the tests-http-mock-support-init-block branch from a326d9e to aea21af Compare August 1, 2023 07:09
@windmgc windmgc force-pushed the tests-http-mock-support-init-block branch from aea21af to 0fa9e28 Compare August 1, 2023 07:23
Copy link
Contributor

@StarlightIbuki StarlightIbuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@windmgc windmgc merged commit 47df07d into master Aug 1, 2023
@windmgc windmgc deleted the tests-http-mock-support-init-block branch August 1, 2023 08:54
chobits added a commit that referenced this pull request Nov 29, 2023
This commit backports HTTP mocking to release/3.2.x, including the
following PRs from master branch: #10885, #11009, #11182 and #11331.
windmgc pushed a commit that referenced this pull request Nov 29, 2023
This commit backports HTTP mocking to release/3.2.x, including the
following PRs from master branch: #10885, #11009, #11182 and #11331.
chobits added a commit that referenced this pull request Nov 30, 2023
This commit backports HTTP mocking to release/3.2.x, including the
following PRs from master branch: #10885, #11009, #11182 and #11331.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants