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 certificate rotation #739

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

Madhur97
Copy link
Contributor

@Madhur97 Madhur97 commented Nov 1, 2022

What this PR does / why we need it:
This PR refactors the certificate rotation code to extract the logic into a separate method and adds unit tests for this method.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #656

Special notes for your reviewer

@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2022

Codecov Report

Merging #739 (2b1aaea) into main (97d4e3b) will increase coverage by 0.80%.
The diff coverage is 68.00%.

❗ Current head 2b1aaea differs from pull request most recent head 9e8dfa2. Consider uploading reports for the commit 9e8dfa2 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #739      +/-   ##
==========================================
+ Coverage   68.27%   69.07%   +0.80%     
==========================================
  Files          20       20              
  Lines        2068     2073       +5     
==========================================
+ Hits         1412     1432      +20     
+ Misses        544      529      -15     
  Partials      112      112              
Impacted Files Coverage Δ
agent/main.go 26.69% <68.00%> (+9.28%) ⬆️

@Madhur97 Madhur97 force-pushed the cert_rotation_test branch 2 times, most recently from 2b1aaea to 6f52025 Compare November 3, 2022 03:48
@Madhur97 Madhur97 marked this pull request as draft November 3, 2022 04:10
@Madhur97 Madhur97 marked this pull request as ready for review November 3, 2022 04:28
@Madhur97 Madhur97 requested a review from shivi28 November 3, 2022 05:03
agent/host_agent_test.go Outdated Show resolved Hide resolved
agent/host_agent_test.go Outdated Show resolved Hide resolved
agent/host_agent_test.go Outdated Show resolved Hide resolved
agent/host_agent_test.go Show resolved Hide resolved
agent/host_agent_test.go Show resolved Hide resolved
agent/main.go Show resolved Hide resolved
Copy link
Contributor

@dharmjit dharmjit left a comment

Choose a reason for hiding this comment

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

some nits only.

agent/host_agent_test.go Outdated Show resolved Hide resolved
agent/host_agent_test.go Outdated Show resolved Hide resolved
agent/main.go Show resolved Hide resolved
@Madhur97 Madhur97 removed the request for review from shubham14bajpai November 9, 2022 05:59
Copy link
Contributor

@dharmjit dharmjit left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

Copy link
Contributor

@mayur-tolexo mayur-tolexo left a comment

Choose a reason for hiding this comment

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

LGTM Nice work 👍

@shivi28
Copy link
Contributor

shivi28 commented Nov 9, 2022

LGTM

@shivi28 shivi28 merged commit 07390fa into vmware-tanzu:main Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit tests for certificate rotation
6 participants