зеркало из https://github.com/Azure/WALinuxAgent.git
Check certificates only if certificates are included in goal state and update test-requirements to remove codecov (#2803)
* Update version to dummy 1.0.0.0' * Revert version change * Only check certificats if goal state includes certs * Fix code coverage deprecated issue * Move condition to function call
This commit is contained in:
Родитель
9390ce579f
Коммит
7de613305a
|
@ -123,6 +123,6 @@ jobs:
|
|||
|
||||
- name: Upload Coverage
|
||||
if: matrix.python-version == 3.9
|
||||
uses: codecov/codecov-action@v2
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
file: ./coverage.xml
|
|
@ -290,12 +290,12 @@ class GoalState(object):
|
|||
# Track goal state comes after that, the extensions will need the new certificate. The Agent needs to refresh the goal state in that
|
||||
# case, to ensure it fetches the new certificate.
|
||||
#
|
||||
if self._extensions_goal_state.source == GoalStateSource.FastTrack:
|
||||
if self._extensions_goal_state.source == GoalStateSource.FastTrack and self._goal_state_properties & GoalStateProperties.Certificates:
|
||||
self._check_certificates()
|
||||
|
||||
def _check_certificates(self):
|
||||
# Re-download certificates in case they have been removed from disk since last download
|
||||
if self._goal_state_properties & GoalStateProperties.Certificates and self._certs_uri is not None:
|
||||
if self._certs_uri is not None:
|
||||
self._download_certificates(self._certs_uri)
|
||||
# Check that certificates needed by extensions are in goal state certs.summary
|
||||
for extension in self.extensions_goal_state.extensions:
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
codecov
|
||||
coverage
|
||||
mock==2.0.0; python_version == '2.6'
|
||||
mock==3.0.5; python_version >= '2.7' and python_version <= '3.5'
|
||||
|
|
Загрузка…
Ссылка в новой задаче