Skip to content

Exposing a method to set request context in the mock config service#163

Merged
varsha-abhinandan merged 2 commits into
mainfrom
saved-filters
May 23, 2023
Merged

Exposing a method to set request context in the mock config service#163
varsha-abhinandan merged 2 commits into
mainfrom
saved-filters

Conversation

@varsha-abhinandan
Copy link
Copy Markdown
Contributor

@varsha-abhinandan varsha-abhinandan commented May 23, 2023

Description

Providing support to add headers to the request context in the mockconfigservice

Testing

Please describe the tests that you ran to verify your changes. Please summarize what did you test and what needs to be tested e.g. deployed and tested helm chart locally.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Documentation

Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.

@github-actions

This comment has been minimized.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2023

Codecov Report

Merging #163 (f7d77a8) into main (cc27573) will decrease coverage by 0.09%.
The diff coverage is 33.33%.

@@             Coverage Diff              @@
##               main     #163      +/-   ##
============================================
- Coverage     80.33%   80.24%   -0.09%     
  Complexity      457      457              
============================================
  Files            54       54              
  Lines          2278     2283       +5     
  Branches         85       86       +1     
============================================
+ Hits           1830     1832       +2     
- Misses          398      401       +3     
  Partials         50       50              
Flag Coverage Δ
integration 80.24% <33.33%> (-0.09%) ⬇️
unit 78.56% <33.33%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ificationChannelConfigServiceRequestValidator.java 52.08% <33.33%> (-1.41%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

return this;
}

public MockGenericConfigService withRequestContext(RequestContext context) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So this was really a placeholder context to avoid having to set a context in a test client, but if you actually do care about a context, it would be better to send it the regular way (via client) rather than assigning it in the server. Could we explore that option instead (that might look like changing the test interceptor in this file to only set the context if unset, for example).

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

Unit Test Results

  28 files  ±0    28 suites  ±0   45s ⏱️ +4s
111 tests ±0  111 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 4b38283. ± Comparison against base commit 6459cad.

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