MF-1676 - Make Bootstrap fetch Certs data on demand
What does this do?
Renew the expired cert, If the cert is not available in bootstrap and thing service, then it will remove all the certs.
Which issue(s) does this PR fix/relate to?
Resolves #1677 and partially #1678.
List any changes that modify/break current functionality
Have you included tests for your changes?
Did you document any new/modified functionality?
Notes
@mainflux/maintainers Hello, At present, in certs table, one thing can have Mutiple certificate, in cert table one thing will Mutiple expired certificate, So if this PR tries to renew all the expired certificate of one thing, then there will be lot of certificates for a thing, So to solve this problem, this PR is approach in different way, One thing can have one certificate. The cert service will renew expired thing certificate and update the serial number in cert table.
Codecov Report
Merging #1669 (26c24a8) into master (d00d13d) will decrease coverage by
1.43%. The diff coverage is14.24%.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## master #1669 +/- ##
==========================================
- Coverage 70.38% 68.96% -1.43%
==========================================
Files 146 146
Lines 11394 11616 +222
==========================================
- Hits 8020 8011 -9
- Misses 2724 2959 +235
+ Partials 650 646 -4
| Impacted Files | Coverage Δ | |
|---|---|---|
| certs/postgres/certs.go | 0.00% <0.00%> (ø) |
|
| pkg/errors/sdk_errors.go | 0.00% <ø> (ø) |
|
| pkg/sdk/go/bootstrap.go | 0.00% <ø> (ø) |
|
| certs/service.go | 19.10% <16.05%> (-64.03%) |
:arrow_down: |
| bootstrap/service.go | 83.10% <100.00%> (ø) |
|
| certs/postgres/init.go | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This PR depends on the following issues https://github.com/mainflux/mainflux/issues/1677 https://github.com/mainflux/mainflux/issues/1676