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

[tools/shoestring] fix: renew certs uses generates a new ca cert #1173

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Wayonb
Copy link
Contributor

@Wayonb Wayonb commented Nov 12, 2024

problem: renew certificates command creates a new ca cert without renew-ca option
solution: only generate a new ca cert with the renew-ca option

problem: renew certificates command creates a new ca cert without renew-ca option
solution: only generate a new ca cert with the renew-ca option
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.22%. Comparing base (cf15643) to head (f7ed588).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1173      +/-   ##
==========================================
- Coverage   98.24%   98.22%   -0.02%     
==========================================
  Files         162      157       -5     
  Lines        6623     6496     -127     
  Branches      143      143              
==========================================
- Hits         6507     6381     -126     
+ Misses        116      115       -1     
Flag Coverage Δ
explorer-rest ?
tools-shoestring 96.86% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...oestring/shoestring/commands/renew_certificates.py 100.00% <100.00%> (ø)
...oestring/shoestring/internal/CertificateFactory.py 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

Copy link
Contributor

@Jaguar0625 Jaguar0625 left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 290 to 293
# Assert:
assert Path('ca.crt.pem').exists()
assert Path('ca.cnf').exists()
assert ca_certificate_path.exists()
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think this test is correct because i believe thes would be created by (first) CertificateFactory. to emulate real behavior, i think you want two temporary directories one for each CertificateFactory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm..I will take a look but I thought the second CertificateFactory would create another temp folder? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In which case the factory.reuse_ca_certificate would fail to create the new_certs folder since its already present. but will move the second CertificateFactory for clarity

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.

2 participants