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

DXCDT-386: Make api test cases more robust #665

Merged
merged 5 commits into from
Mar 8, 2023
Merged

Conversation

sergiught
Copy link
Contributor

@sergiught sergiught commented Mar 8, 2023

🔧 Changes

The api command test cases seem to be very flaky due to the big json output and commander having issues parsing it and not finding the right values. In this PR we're leveraging the query parameters to only get back one field and check it for the right value.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@sergiught sergiught force-pushed the DXCDT-386/api-test-cases branch from df0efc4 to 7aa952f Compare March 8, 2023 10:50
@sergiught sergiught marked this pull request as ready for review March 8, 2023 10:55
@sergiught sergiught requested a review from a team as a code owner March 8, 2023 10:55
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: +0.02 🎉

Comparison is base (a5d1b55) 51.12% compared to head (7aa952f) 51.15%.

Additional details and impacted files
@@                      Coverage Diff                       @@
##           DXCDT-386-log-stream-tests     #665      +/-   ##
==============================================================
+ Coverage                       51.12%   51.15%   +0.02%     
==============================================================
  Files                              92       92              
  Lines                           11607    11607              
==============================================================
+ Hits                             5934     5937       +3     
+ Misses                           5244     5242       -2     
+ Partials                          429      428       -1     
Impacted Files Coverage Δ
internal/cli/api.go 79.48% <0.00%> (+1.53%) ⬆️

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.

Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

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

LGTM, just a non-blocking nit.

json:
idle_session_lifetime: "72"

004 - it fails to use the api command to patch tenant settings with wrong json:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
004 - it fails to use the api command to patch tenant settings with wrong json:
004 - it fails to use the api command to patch tenant settings with invalid json:

@sergiught sergiught force-pushed the DXCDT-386/api-test-cases branch from 7aa952f to b37ebbb Compare March 8, 2023 13:41
Base automatically changed from DXCDT-386-log-stream-tests to main March 8, 2023 13:51
@sergiught sergiught merged commit 855584d into main Mar 8, 2023
@sergiught sergiught deleted the DXCDT-386/api-test-cases branch March 8, 2023 13:51
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.

3 participants