easyrsa unit tests fail on Py35

Bug #1914073 reported by Cory Johns
This bug report is a duplicate of:  Bug #1901687: Low test coverage. Edit Remove
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
EasyRSA Charm
Triaged
Medium
Martin Kalcok

Bug Description

https://github.com/charmed-kubernetes/layer-easyrsa/pull/32/checks?check_run_id=1806071711

Seems like actual test failures but I'm not sure why it only applies to Python 3.5.

Also, Nick pointed out that Python 3.5 is deprecated in the current pip and pip 21 will drop support entirely. I think we have to continue to support Python 3.5 as long as we support Xenial, so we may need to do something to ensure that an older version of pip is used for those tests.

Revision history for this message
Martin Kalcok (martin-kalcok) wrote :

re: test failures
The log from the github CI run is unfortunately expired, but I ran the tests on the xenial machine with python 3.5 and the problem is that the tests use `Mock.assert_called` method [1] which was added python 3.6. I currently work on UT coverage of easyrsa layer, so I can include fix for this in the same PR.
Additionally, I'll propose change to github actions so that the tests are run on all opened PRs, not only on push to `master` branch, so that these problems can be caught before PR merge.

re: python35
I think this is fine as long as the github actions we use, support python 3.5. We don't have much control over which pip is used. We just specify on which python interpreters we want to run our tests.

---
[1] https://docs.python.org/3/library/unittest.mock.html?highlight=mock#unittest.mock.Mock.assert_called

Changed in charm-easyrsa:
assignee: nobody → Martin Kalcok (martin-kalcok)
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

This appears fixed by the work done in coverage bug lp:1901687. Marking dupe.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.