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

Add unit tests for anonymizer/app/writer #5162

Merged
merged 10 commits into from Feb 9, 2024

Conversation

h4shk4t
Copy link
Contributor

@h4shk4t h4shk4t commented Feb 4, 2024

Which problem is this PR solving?

Description of the changes

  • Added unit tests for cmd/anonymizer/app/writer/

How was this change tested?

  • go test -cover -v ./cmd/anonymizer/app/writer
  • make lint test

Checklist

Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
@h4shk4t h4shk4t requested a review from a team as a code owner February 4, 2024 11:09
Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bd7c9d6) 94.09% compared to head (04ddd39) 94.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5162      +/-   ##
==========================================
+ Coverage   94.09%   94.38%   +0.29%     
==========================================
  Files         331      331              
  Lines       19156    19156              
==========================================
+ Hits        18025    18081      +56     
+ Misses        951      886      -65     
- Partials      180      189       +9     
Flag Coverage Δ
cassandra-3.x 25.58% <ø> (ø)
cassandra-4.x 25.58% <ø> (ø)
elasticsearch-5.x 19.85% <ø> (-0.02%) ⬇️
elasticsearch-6.x 19.85% <ø> (-0.02%) ⬇️
elasticsearch-7.x 20.00% <ø> (ø)
elasticsearch-8.x 20.08% <ø> (ø)
grpc-badger 19.48% <ø> (-0.02%) ⬇️
kafka 14.09% <ø> (ø)
opensearch-1.x 20.00% <ø> (ø)
opensearch-2.x 19.98% <ø> (-0.02%) ⬇️
unittests 92.15% <100.00%> (+0.29%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
cmd/anonymizer/main.go Outdated Show resolved Hide resolved
cmd/anonymizer/main.go Outdated Show resolved Hide resolved
cmd/anonymizer/main.go Outdated Show resolved Hide resolved
Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
cmd/anonymizer/main.go Outdated Show resolved Hide resolved
Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
Signed-off-by: Ashutosh Srivastava <ashutosh3002@gmail.com>
@yurishkuro yurishkuro added the changelog:test Change that's adding missing tests or correcting existing tests label Feb 9, 2024
@yurishkuro yurishkuro enabled auto-merge (squash) February 9, 2024 17:28
@yurishkuro
Copy link
Member

Coverage 94.09% ==> 94.38%, nice! 🎉

@yurishkuro yurishkuro merged commit 951943f into jaegertracing:main Feb 9, 2024
36 of 37 checks passed
dmitryax pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Mar 12, 2024
…31709)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/jaegertracing/jaeger](https://togithub.com/jaegertracing/jaeger)
| `v1.54.0` -> `v1.55.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fjaegertracing%2fjaeger/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fjaegertracing%2fjaeger/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fjaegertracing%2fjaeger/v1.54.0/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fjaegertracing%2fjaeger/v1.54.0/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>jaegertracing/jaeger
(github.com/jaegertracing/jaeger)</summary>

###
[`v1.55.0`](https://togithub.com/jaegertracing/jaeger/releases/tag/v1.55.0):
Release 1.55.0

[Compare
Source](https://togithub.com/jaegertracing/jaeger/compare/v1.54.0...v1.55.0)

##### Backend Changes

##### ✨ New Features:

- Support uploading traces to UI in OpenTelemetry format (OTLP/JSON)
([@&#8203;NavinShrinivas](https://togithub.com/NavinShrinivas) in
[#&#8203;5155](https://togithub.com/jaegertracing/jaeger/pull/5155))
- Add Elasticsearch storage support for adaptive sampling
([@&#8203;Pushkarm029](https://togithub.com/Pushkarm029) in
[#&#8203;5158](https://togithub.com/jaegertracing/jaeger/pull/5158))

##### 🐞 Bug fixes, Minor Improvements:

- Add the `print-config` subcommand
([@&#8203;gmafrac](https://togithub.com/gmafrac) in
[#&#8203;5200](https://togithub.com/jaegertracing/jaeger/pull/5200))
- Return more detailed errors from ES storage
([@&#8203;yurishkuro](https://togithub.com/yurishkuro) in
[#&#8203;5209](https://togithub.com/jaegertracing/jaeger/pull/5209))
- Bump go version ([@&#8203;yurishkuro](https://togithub.com/yurishkuro)
in [#&#8203;5180](https://togithub.com/jaegertracing/jaeger/pull/5180))

##### 🚧 Experimental Features:

- \[jaeger-v2] Add support for gRPC storarge
([@&#8203;james-ryans](https://togithub.com/james-ryans) in
[#&#8203;5228](https://togithub.com/jaegertracing/jaeger/pull/5228))
- \[jaeger-v2] Add support for Elasticsearch
([@&#8203;akagami-harsh](https://togithub.com/akagami-harsh) in
[#&#8203;5152](https://togithub.com/jaegertracing/jaeger/pull/5152))

##### 📊 UI Changes

- UI pinned to version
[1.39.0](https://togithub.com/jaegertracing/jaeger-ui/blob/main/CHANGELOG.md#v1390-2024-03-04).

##### 👏 New Contributors

- [@&#8203;h4shk4t](https://togithub.com/h4shk4t) made their first
contribution in
[jaegertracing/jaeger#5162
- [@&#8203;NavinShrinivas](https://togithub.com/NavinShrinivas) made
their first contribution in
[jaegertracing/jaeger#5155
- [@&#8203;prakrit55](https://togithub.com/prakrit55) made their first
contribution in
[jaegertracing/jaeger#5197
- [@&#8203;gmafrac](https://togithub.com/gmafrac) made their first
contribution in
[jaegertracing/jaeger#5200

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
DougManton pushed a commit to DougManton/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
…pen-telemetry#31709)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/jaegertracing/jaeger](https://togithub.com/jaegertracing/jaeger)
| `v1.54.0` -> `v1.55.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fjaegertracing%2fjaeger/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fjaegertracing%2fjaeger/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fjaegertracing%2fjaeger/v1.54.0/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fjaegertracing%2fjaeger/v1.54.0/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>jaegertracing/jaeger
(github.com/jaegertracing/jaeger)</summary>

###
[`v1.55.0`](https://togithub.com/jaegertracing/jaeger/releases/tag/v1.55.0):
Release 1.55.0

[Compare
Source](https://togithub.com/jaegertracing/jaeger/compare/v1.54.0...v1.55.0)

##### Backend Changes

##### ✨ New Features:

- Support uploading traces to UI in OpenTelemetry format (OTLP/JSON)
([@&open-telemetry#8203;NavinShrinivas](https://togithub.com/NavinShrinivas) in
[#&open-telemetry#8203;5155](https://togithub.com/jaegertracing/jaeger/pull/5155))
- Add Elasticsearch storage support for adaptive sampling
([@&open-telemetry#8203;Pushkarm029](https://togithub.com/Pushkarm029) in
[#&open-telemetry#8203;5158](https://togithub.com/jaegertracing/jaeger/pull/5158))

##### 🐞 Bug fixes, Minor Improvements:

- Add the `print-config` subcommand
([@&open-telemetry#8203;gmafrac](https://togithub.com/gmafrac) in
[#&open-telemetry#8203;5200](https://togithub.com/jaegertracing/jaeger/pull/5200))
- Return more detailed errors from ES storage
([@&open-telemetry#8203;yurishkuro](https://togithub.com/yurishkuro) in
[#&open-telemetry#8203;5209](https://togithub.com/jaegertracing/jaeger/pull/5209))
- Bump go version ([@&open-telemetry#8203;yurishkuro](https://togithub.com/yurishkuro)
in [#&open-telemetry#8203;5180](https://togithub.com/jaegertracing/jaeger/pull/5180))

##### 🚧 Experimental Features:

- \[jaeger-v2] Add support for gRPC storarge
([@&open-telemetry#8203;james-ryans](https://togithub.com/james-ryans) in
[#&open-telemetry#8203;5228](https://togithub.com/jaegertracing/jaeger/pull/5228))
- \[jaeger-v2] Add support for Elasticsearch
([@&open-telemetry#8203;akagami-harsh](https://togithub.com/akagami-harsh) in
[#&open-telemetry#8203;5152](https://togithub.com/jaegertracing/jaeger/pull/5152))

##### 📊 UI Changes

- UI pinned to version
[1.39.0](https://togithub.com/jaegertracing/jaeger-ui/blob/main/CHANGELOG.md#v1390-2024-03-04).

##### 👏 New Contributors

- [@&open-telemetry#8203;h4shk4t](https://togithub.com/h4shk4t) made their first
contribution in
[jaegertracing/jaeger#5162
- [@&open-telemetry#8203;NavinShrinivas](https://togithub.com/NavinShrinivas) made
their first contribution in
[jaegertracing/jaeger#5155
- [@&open-telemetry#8203;prakrit55](https://togithub.com/prakrit55) made their first
contribution in
[jaegertracing/jaeger#5197
- [@&open-telemetry#8203;gmafrac](https://togithub.com/gmafrac) made their first
contribution in
[jaegertracing/jaeger#5200

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
…pen-telemetry#31709)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/jaegertracing/jaeger](https://togithub.com/jaegertracing/jaeger)
| `v1.54.0` -> `v1.55.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fjaegertracing%2fjaeger/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fjaegertracing%2fjaeger/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fjaegertracing%2fjaeger/v1.54.0/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fjaegertracing%2fjaeger/v1.54.0/v1.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>jaegertracing/jaeger
(github.com/jaegertracing/jaeger)</summary>

###
[`v1.55.0`](https://togithub.com/jaegertracing/jaeger/releases/tag/v1.55.0):
Release 1.55.0

[Compare
Source](https://togithub.com/jaegertracing/jaeger/compare/v1.54.0...v1.55.0)

##### Backend Changes

##### ✨ New Features:

- Support uploading traces to UI in OpenTelemetry format (OTLP/JSON)
([@&open-telemetry#8203;NavinShrinivas](https://togithub.com/NavinShrinivas) in
[#&open-telemetry#8203;5155](https://togithub.com/jaegertracing/jaeger/pull/5155))
- Add Elasticsearch storage support for adaptive sampling
([@&open-telemetry#8203;Pushkarm029](https://togithub.com/Pushkarm029) in
[#&open-telemetry#8203;5158](https://togithub.com/jaegertracing/jaeger/pull/5158))

##### 🐞 Bug fixes, Minor Improvements:

- Add the `print-config` subcommand
([@&open-telemetry#8203;gmafrac](https://togithub.com/gmafrac) in
[#&open-telemetry#8203;5200](https://togithub.com/jaegertracing/jaeger/pull/5200))
- Return more detailed errors from ES storage
([@&open-telemetry#8203;yurishkuro](https://togithub.com/yurishkuro) in
[#&open-telemetry#8203;5209](https://togithub.com/jaegertracing/jaeger/pull/5209))
- Bump go version ([@&open-telemetry#8203;yurishkuro](https://togithub.com/yurishkuro)
in [#&open-telemetry#8203;5180](https://togithub.com/jaegertracing/jaeger/pull/5180))

##### 🚧 Experimental Features:

- \[jaeger-v2] Add support for gRPC storarge
([@&open-telemetry#8203;james-ryans](https://togithub.com/james-ryans) in
[#&open-telemetry#8203;5228](https://togithub.com/jaegertracing/jaeger/pull/5228))
- \[jaeger-v2] Add support for Elasticsearch
([@&open-telemetry#8203;akagami-harsh](https://togithub.com/akagami-harsh) in
[#&open-telemetry#8203;5152](https://togithub.com/jaegertracing/jaeger/pull/5152))

##### 📊 UI Changes

- UI pinned to version
[1.39.0](https://togithub.com/jaegertracing/jaeger-ui/blob/main/CHANGELOG.md#v1390-2024-03-04).

##### 👏 New Contributors

- [@&open-telemetry#8203;h4shk4t](https://togithub.com/h4shk4t) made their first
contribution in
[jaegertracing/jaeger#5162
- [@&open-telemetry#8203;NavinShrinivas](https://togithub.com/NavinShrinivas) made
their first contribution in
[jaegertracing/jaeger#5155
- [@&open-telemetry#8203;prakrit55](https://togithub.com/prakrit55) made their first
contribution in
[jaegertracing/jaeger#5197
- [@&open-telemetry#8203;gmafrac](https://togithub.com/gmafrac) made their first
contribution in
[jaegertracing/jaeger#5200

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:test Change that's adding missing tests or correcting existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants