-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add tests for internal/extension/jaegerquery #5123
Add tests for internal/extension/jaegerquery #5123
Conversation
cd84a57
to
033ea71
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.
please provide output of
go test -cover ./cmd/jaeger/internal/extension/jaegerquery/
033ea71
to
bb28873
Compare
|
bb28873
to
7918d8a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5123 +/- ##
==========================================
+ Coverage 94.91% 95.30% +0.39%
==========================================
Files 334 334
Lines 16230 16233 +3
==========================================
+ Hits 15404 15471 +67
+ Misses 648 582 -66
- Partials 178 180 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Need to fix linter errors (run make lint
)
go test -cover ./cmd/jaeger/internal/extension/jaegerquery/
ok github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerquery 0.013s coverage: 84.1% of statements
needs to be above 95%
e81e4fe
to
f9fe693
Compare
Partially Addresses: jaegertracing#5068 - This commit adds tests for the `cmd/jaeger/internal/extension/jaegerquery` package. It brings the code coverage of the package to 84% - make test - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` Signed-off-by: VaibhavMalik4187 <[email protected]>
f9fe693
to
0362bfd
Compare
Signed-off-by: Yuri Shkuro <[email protected]>
I added example of another test: 7af4dc1
|
This is what I would suggest:
and have |
@VaibhavMalik4187 do you plan to finish this? |
I'm sorry for being inactive. I'll finish this soon. Thanks for bearing with me. |
No worries, I just don't want this to rot & get lost, as these are valuable changes. |
Quick update, I've tried to incorporate your suggestions and now the code coverage of this package has crossed the 95% mark. Could you please go through this PR once again? Many thanks! |
This commit includes the implementation of missing tests for jaegerquery server defined in the `internal/extension/jaegerquery` package. With the addition of these tests, the code coverage of this package bumps to >95% This commit also incorporates a small change in the jaegerstorage extension. The `GetStorageFactory` method will now accept `StorageExt` interface from the host. This allowed more comprehensive testing using mock objects. Signed-off-by: VaibhavMalik4187 <[email protected]>
13db5bf
to
efb09b8
Compare
} | ||
|
||
func (ff fakeFactory) CreateDependencyReader() (dependencystore.Reader, error) { | ||
if ff.name == "need-dependency-reader-error" { |
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.
this is not a great pattern, I suggest you simply store the Error object in fakeFactory
that it's expected to return
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.
please address all open comments
On it. |
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Thanks, @VaibhavMalik4187 |
Which problem is this PR solving?
Description of the changes
cmd/jaeger/internal/extension/jaegerquery
package.How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test