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

Convert token propagation integration test to plain unit test #4162

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

yurishkuro
Copy link
Member

Which problem is this PR solving?

  • plugin/storage/integration/token_propagation_test.go is using mock ES server created in the test itself
  • even though it also uses query service binary, it can be started directly in the unit test

Short description of the changes

  • move the test to cmd/query/app/token_propagation_test.go as a unit test
  • simplify mock ES handler by relying on bearertoken.PropagationHandler
  • remove from scripts/es-integration-test.sh and simplify that script a bit

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@yurishkuro yurishkuro requested a review from a team as a code owner January 16, 2023 02:43
@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Base: 97.11% // Head: 97.12% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (551f463) compared to base (bc25ce8).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4162      +/-   ##
==========================================
+ Coverage   97.11%   97.12%   +0.01%     
==========================================
  Files         296      296              
  Lines       17452    17452              
==========================================
+ Hits        16948    16951       +3     
+ Misses        406      403       -3     
  Partials       98       98              
Flag Coverage Δ
unittests 97.12% <ø> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
plugin/storage/integration/integration.go 76.33% <0.00%> (+0.38%) ⬆️
...lugin/sampling/strategystore/adaptive/processor.go 100.00% <0.00%> (+0.61%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yurishkuro yurishkuro merged commit 65ad4fc into jaegertracing:main Jan 16, 2023
@yurishkuro yurishkuro deleted the token-test branch January 16, 2023 03:12
shubbham1215 pushed a commit to shubbham1215/jaeger that referenced this pull request Feb 22, 2023
…tracing#4162)

## Which problem is this PR solving?
- `plugin/storage/integration/token_propagation_test.go` is using mock
ES server created in the test itself
- even though it also uses query service binary, it can be started
directly in the unit test

## Short description of the changes
- move the test to `cmd/query/app/token_propagation_test.go` as a unit
test
- simplify mock ES handler by relying on
`bearertoken.PropagationHandler`
- remove from scripts/es-integration-test.sh and simplify that script a
bit

Signed-off-by: Yuri Shkuro <[email protected]>
shubbham1215 pushed a commit to shubbham1215/jaeger that referenced this pull request Mar 5, 2023
…tracing#4162)

## Which problem is this PR solving?
- `plugin/storage/integration/token_propagation_test.go` is using mock
ES server created in the test itself
- even though it also uses query service binary, it can be started
directly in the unit test

## Short description of the changes
- move the test to `cmd/query/app/token_propagation_test.go` as a unit
test
- simplify mock ES handler by relying on
`bearertoken.PropagationHandler`
- remove from scripts/es-integration-test.sh and simplify that script a
bit

Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: shubbham1215 <[email protected]>
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.

1 participant