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

change the regular expression to fix the issue #853 caused by PR #837 #854

Merged
merged 7 commits into from
Dec 9, 2020

Conversation

sdghchj
Copy link
Member

@sdghchj sdghchj commented Dec 8, 2020

Describe the PR
Repair the regular expression for full response
fix #855

Relation issue
#853 , #855

@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #854 (7f6ef33) into master (98b8c70) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #854   +/-   ##
=======================================
  Coverage   84.83%   84.83%           
=======================================
  Files           8        8           
  Lines        1649     1649           
=======================================
  Hits         1399     1399           
  Misses        145      145           
  Partials      105      105           
Impacted Files Coverage Δ
operation.go 87.66% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98b8c70...7f6ef33. Read the comment docs.

@easonlin404
Copy link
Member

easonlin404 commented Dec 8, 2020

@sdghchj May I know why this change can fix the #853 ?

@sdghchj
Copy link
Member Author

sdghchj commented Dec 8, 2020

@sdghchj May I know why this change can fix the #853 ?

For example:
400 "Failed to pass json schema"

The old RegExp ([\w,]+)[\s]+([\w\{\}]+)[\s]+([\w\-\.\/\{\}=,\[\]]+)[^"]*(.*)? will find a match Failed to pass json schema", and the 4 submatchs are Failed to pass " ,leading to run function ParseResponseComment.

So, it is necessary to match from the beginning, and make it run function ParseEmptyResponseComment.

The response description it's ok in the old test has a special character ' which mismatches the old RegExp.

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.

Comma-separated failure codes reusing the description
2 participants