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:
maddieford 2023-04-14 16:20:39 -07:00 коммит произвёл GitHub
Родитель 9390ce579f
Коммит 7de613305a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 3 добавлений и 4 удалений

2
.github/workflows/ci_pr.yml поставляемый
Просмотреть файл

@ -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'