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

[test] : add unittests for vpc.go file #281

Merged
merged 3 commits into from
Dec 19, 2024
Merged

[test] : add unittests for vpc.go file #281

merged 3 commits into from
Dec 19, 2024

Conversation

rahulait
Copy link
Collaborator

@rahulait rahulait commented Dec 19, 2024

General:

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

@github-actions github-actions bot added the testing for updates to the testing suite in the changelog. label Dec 19, 2024
}
}

func TestGetVPCID(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

qq: any reason to not use tabular test format for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ListVPCs() call and its response is changing in each test run, hence I avoided tabular format. Not sure if we can achieve that with tabular format unless we do if/else with bunch of conditions to decide which mock call to use.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah i see. I'm okay with that

@rahulait rahulait force-pushed the add-vpc-unittests branch 3 times, most recently from c311539 to 9bc2a2d Compare December 19, 2024 19:45
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.92%. Comparing base (3510bc4) to head (cff5c44).
Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
+ Coverage   56.63%   57.92%   +1.29%     
==========================================
  Files          12       12              
  Lines        2412     2415       +3     
==========================================
+ Hits         1366     1399      +33     
+ Misses        892      864      -28     
+ Partials      154      152       -2     

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

Copy link
Contributor

@komer3 komer3 left a comment

Choose a reason for hiding this comment

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

LGTM!

@rahulait rahulait merged commit 9d6203b into main Dec 19, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing for updates to the testing suite in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants