-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
#2002 Early removal of a replaced placeholder parameter in DownstreamUrlCreatorMiddleware
#2003
#2002 Early removal of a replaced placeholder parameter in DownstreamUrlCreatorMiddleware
#2003
Conversation
I answered you in #2002, see link! As a hotfix DevOps you need to rollback to version 21.0 as I suggested to you. If you need something more, then just fork Ocelot repo and develop whatever you want! |
Strange... the build 3669 is 🟢 |
Once again... |
DownstreamUrlCreatorMiddleware
The build 3669 is green because the new code have no regression and work correctly, but we need some new test that cover the case where parameter name and value are some like |
🆗 Work more! |
a69f646
to
a87ef17
Compare
DownstreamUrlCreatorMiddleware
DownstreamUrlCreatorMiddleware
src/Ocelot/DownstreamUrlCreator/Middleware/DownstreamUrlCreatorMiddleware.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added an alternate method, up to you.
src/Ocelot/DownstreamUrlCreator/Middleware/DownstreamUrlCreatorMiddleware.cs
Outdated
Show resolved
Hide resolved
7f07a5f
to
9c956a0
Compare
6ffe2be
to
8a32b67
Compare
8a32b67
to
a90b160
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes can break functionality of Query String Placeholders feature of placeholder replacements in query string. I need to understand why old tests green and final decision will be made after realizing that published functionality of Restrictions on use still work well.
Now I realized that the name of this docs section confuses community but actually this is the feature which will not be removed from the docs, but I will give the new name to the section.
new("{userId}", "webley"), | ||
new("{personId}", "12345"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again! 😬
This is copied user scenario from old tests!
Where is testing of your user scenario ❓
.When(x => x.WhenICallTheMiddleware()) | ||
.Then(x => x.ThenTheDownstreamRequestUriIs($"http://localhost:5000/persons?groupId=6789&personId=12345&userId=webley")) | ||
.And(x => ThenTheQueryStringIs("?groupId=6789&personId=12345&userId=webley")) | ||
.BDDfy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use BDDfy for new unit tests anymore! See UnitTest
class constructor!
BDDfy will be removed from all unit tests soon... This is absolutely useless framework for unit tests. xUnit works well...
test/Ocelot.UnitTests/DownstreamUrlCreator/DownstreamUrlCreatorMiddlewareTests.cs
Outdated
Show resolved
Hide resolved
0b0f29c
to
efe3927
Compare
efe3927
to
42e39c1
Compare
Co-authored-by: Raynald Messié <redbird_project@yahoo.fr>
Please use language version 12.0 or greater.
42e39c1
to
9d947b2
Compare
…lCreatorMiddleware
…lCreatorMiddleware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #2002
Proposed Changes
Remove only added query to placeholders.