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

[storage] Simplify integration tests #5312

Merged
merged 5 commits into from
Mar 30, 2024

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Mar 29, 2024

Description of the changes

  • Remove usage of build tags, since they make it mode difficult to compile files in the IDE.
  • Make all tests use STORAGE env var
  • Pass testing.T to functions, simplify error handling

How was this change tested?

  • CI

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro requested a review from a team as a code owner March 29, 2024 21:12
@yurishkuro yurishkuro added the changelog:test Change that's adding missing tests or correcting existing tests label Mar 29, 2024
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.15%. Comparing base (bae96f7) to head (51ecfcb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5312   +/-   ##
=======================================
  Coverage   95.15%   95.15%           
=======================================
  Files         340      340           
  Lines       16664    16666    +2     
=======================================
+ Hits        15856    15858    +2     
  Misses        617      617           
  Partials      191      191           
Flag Coverage Δ
badger 12.25% <100.00%> (-1.03%) ⬇️
cassandra-3.x 21.14% <100.00%> (-5.29%) ⬇️
cassandra-4.x 21.14% <100.00%> (-5.29%) ⬇️
elasticsearch-5.x 17.68% <100.00%> (-4.39%) ⬇️
elasticsearch-6.x 17.70% <100.00%> (-4.39%) ⬇️
elasticsearch-7.x 17.76% <100.00%> (-4.41%) ⬇️
elasticsearch-8.x 17.83% <100.00%> (-4.41%) ⬇️
grpc 11.59% <100.00%> (+0.03%) ⬆️
kafka 11.84% <80.00%> (-2.83%) ⬇️
opensearch-1.x 17.75% <100.00%> (-4.42%) ⬇️
opensearch-2.x 17.76% <100.00%> (-4.39%) ⬇️
unittests 92.33% <100.00%> (+<0.01%) ⬆️

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: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro changed the title [storage integration tests] Simplify error checking [storage] Simplify integration tests Mar 29, 2024
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
@@ -154,31 +148,6 @@ func runIndexRolloverWithILMTest(t *testing.T, client *elastic.Client, prefix st
assert.ElementsMatch(t, actualWriteAliases, expectedWriteAliases, fmt.Sprintf("aliases found: %v, expected: %v", actualWriteAliases, expectedWriteAliases))
}

func createESClient() (*elastic.Client, error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

these functions are identical to those defined in cleaner_test

Signed-off-by: Yuri Shkuro <github@ysh.us>
Copy link
Contributor

@jkowall jkowall left a comment

Choose a reason for hiding this comment

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

lgtm!

@jkowall jkowall merged commit 34f6a25 into jaegertracing:main Mar 30, 2024
37 checks passed
@yurishkuro yurishkuro deleted the pass-testing branch March 31, 2024 00:17
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.

2 participants