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

Added unit tests for the create.sh script #6594

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

asimchoudhary
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • created unit tests for the create.sh file , to test for various cases such as presence of Mode parameter , output for specific parameters

How was this change tested?

Checklist

@asimchoudhary asimchoudhary requested a review from a team as a code owner January 22, 2025 19:21
@asimchoudhary asimchoudhary requested a review from jkowall January 22, 2025 19:21
@dosubot dosubot bot added the area/storage label Jan 22, 2025
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

🚀

@yurishkuro yurishkuro added the changelog:test Change that's adding missing tests or correcting existing tests label Jan 22, 2025
@yurishkuro
Copy link
Member

It doesn't look like the test is being run in the CI, I only see compute-tags test being run.

https://github.com/jaegertracing/jaeger/actions/runs/12915527527/job/36017583978?pr=6594#step:8:1

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.24%. Comparing base (3222e01) to head (b1b85fe).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6594      +/-   ##
==========================================
+ Coverage   96.21%   96.24%   +0.02%     
==========================================
  Files         375      377       +2     
  Lines       21397    21421      +24     
==========================================
+ Hits        20588    20617      +29     
+ Misses        616      612       -4     
+ Partials      193      192       -1     
Flag Coverage Δ
badger_v1 10.63% <ø> (ø)
badger_v2 2.78% <ø> (ø)
cassandra-4.x-v1-manual 16.64% <ø> (ø)
cassandra-4.x-v2-auto 2.72% <ø> (ø)
cassandra-4.x-v2-manual 2.72% <ø> (ø)
cassandra-5.x-v1-manual 16.64% <ø> (ø)
cassandra-5.x-v2-auto 2.72% <ø> (ø)
cassandra-5.x-v2-manual 2.72% <ø> (ø)
elasticsearch-6.x-v1 20.44% <ø> (ø)
elasticsearch-7.x-v1 20.51% <ø> (ø)
elasticsearch-8.x-v1 20.66% <ø> (ø)
elasticsearch-8.x-v2 2.77% <ø> (-0.01%) ⬇️
grpc_v1 12.20% <ø> (+<0.01%) ⬆️
grpc_v2 9.06% <ø> (ø)
kafka-3.x-v1 10.36% <ø> (ø)
kafka-3.x-v2 2.78% <ø> (ø)
memory_v2 2.78% <ø> (ø)
opensearch-1.x-v1 20.56% <ø> (ø)
opensearch-2.x-v1 20.56% <ø> (+<0.01%) ⬆️
opensearch-2.x-v2 2.78% <ø> (ø)
tailsampling-processor 0.51% <ø> (ø)
unittests 95.10% <ø> (+0.02%) ⬆️

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.

@yurishkuro
Copy link
Member

.github/workflows/ci-lint-checks.yaml
119:        SHUNIT2=.tools/shunit2 bash scripts/utils/compute-tags.test.sh

Let's create a single wrapper scripts/utils/run-tests.sh and call it from the workflow, and inside that script call individual scripts.

I prefer not to use auto-discovery (like *.test.sh) in case we change the naming or move stuff.

@asimchoudhary
Copy link
Contributor Author

On it !

@asimchoudhary
Copy link
Contributor Author

@yurishkuro sir , is there a way to run the ci pipeline (ci-lint-checks.yaml) on my forked version ?
i want to test the changes before raising the pr

@yurishkuro
Copy link
Member

I don't think you can run the actual workflow, but you can run individual commands from it

@asimchoudhary
Copy link
Contributor Author

@yurishkuro sir , can you please review the changes and give me feedback.

@@ -12,175 +12,174 @@ concurrency:
cancel-in-progress: true

# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
permissions: # added using https://github.com/step-security/secure-workflows
permissions: # added using https://github.com/step-security/secure-workflows
Copy link
Member

Choose a reason for hiding this comment

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

if there are changes needed to this file it should be in one line, not across the whole file. Please revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage 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.

2 participants