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

Unit tests for Await logic (Creation) #2797

Merged
merged 4 commits into from
Feb 1, 2024
Merged

Conversation

EronWright
Copy link
Contributor

@EronWright EronWright commented Jan 31, 2024

Proposed changes

This PR implements unit tests for the await logic, i.e. the flow of hitting the API server (with retry), then invoking the registered awaiter to poll for success, then refreshing the live object.

Related issues (optional)

Closes #2791

Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (6f1e306) 23.41% compared to head (5ce341d) 24.72%.

Files Patch % Lines
provider/pkg/await/await.go 28.57% 15 Missing ⚠️
provider/pkg/clients/clients.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2797      +/-   ##
==========================================
+ Coverage   23.41%   24.72%   +1.30%     
==========================================
  Files          48       48              
  Lines        9629     9647      +18     
==========================================
+ Hits         2255     2385     +130     
+ Misses       7224     7106     -118     
- Partials      150      156       +6     

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

@EronWright EronWright changed the title Unit tests for Await logic Unit tests for Await logic (Creation) Jan 31, 2024
@EronWright EronWright requested a review from rquitales January 31, 2024 19:25
@EronWright EronWright marked this pull request as ready for review January 31, 2024 20:11
@EronWright EronWright force-pushed the eronwright-issue-2539-pre1 branch from b03b0d1 to 64fd212 Compare January 31, 2024 21:59
Copy link
Member

@rquitales rquitales left a comment

Choose a reason for hiding this comment

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

Overall looks good to me other than a few minor comments. Thanks for the work on this!

CHANGELOG.md Outdated Show resolved Hide resolved
provider/pkg/clients/fake/clients.go Outdated Show resolved Hide resolved
provider/pkg/clients/fake/discovery.go Outdated Show resolved Hide resolved
provider/pkg/clients/fake/discovery.go Outdated Show resolved Hide resolved
provider/pkg/clients/fake/discovery.go Outdated Show resolved Hide resolved
provider/pkg/host/fake/host.go Outdated Show resolved Hide resolved
provider/pkg/host/host.go Show resolved Hide resolved
provider/pkg/provider/suite_test.go Show resolved Hide resolved
provider/pkg/await/await_test.go Outdated Show resolved Hide resolved
@lblackstone
Copy link
Member

LGTM overall. I'd echo @rquitales' comments, but this looks like a nice addition to the test suite! 🎉

@EronWright EronWright added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Feb 1, 2024
Copy link
Member

@rquitales rquitales left a comment

Choose a reason for hiding this comment

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

LGTM. Will just need a rebase to the latest changes in the main branch to fix workflow issues.

@EronWright EronWright force-pushed the eronwright-issue-2539-pre1 branch from a0edac7 to 5ce341d Compare February 1, 2024 19:20
@EronWright EronWright enabled auto-merge (squash) February 1, 2024 19:22
@EronWright EronWright merged commit 4a5bfcc into master Feb 1, 2024
20 checks passed
@EronWright EronWright deleted the eronwright-issue-2539-pre1 branch February 1, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unittests for await logic (Creation)
3 participants