"tox -e unit" fails on the master branch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
logrotate-charm |
Fix Released
|
Medium
|
Diko Parvanov |
Bug Description
"tox -e unit" on the master branch fails with errors:
tests/unit/
tests/unit/
tests/unit/
tests/unit/
tests/unit/
tests/unit/
An example of the error is:
=======
_______
name = 'lib_logrotate.
def resolve(name):
# simplified from zope.dottedname
parts = name.split(".")
used = parts.pop(0)
found = __import__(used)
for part in parts:
used += "." + part
try:
except AttributeError:
else:
# we use explicit un-nesting of the handling block in order
# to avoid nested exceptions on python 3
try:
> __import__(used)
E ModuleNotFoundE
.tox/unit/
During handling of the above exception, another exception occurred:
monkeypatch = <_pytest.
@pytest.fixture
def mock_hookenv_
import yaml
def mock_config():
cfg = {}
yml = yaml.load(
# Load all defaults
for key, value in yml['options'
# Manually add cfg from other layers
# cfg['my-
return cfg
> monkeypatch.
E ImportError: import error in lib_logrotate.
---
I expect that this is causing all of the errors (i.e. the import error).
Unfortunately, without a solid baseline in master, it's difficult/
Related branches
- Diko Parvanov: Approve
-
Diff: 672 lines (+148/-131)10 files modifiedactions/actions.py (+12/-21)
dev/null (+0/-13)
lib/lib_cron.py (+38/-32)
lib/lib_logrotate.py (+17/-24)
reactive/logrotate.py (+20/-8)
tests/functional/conftest.py (+14/-9)
tests/functional/juju_tools.py (+14/-13)
tests/functional/test_logrotate.py (+5/-2)
tests/unit/conftest.py (+11/-0)
tests/unit/test_logrotate.py (+17/-9)
Changed in logrotate-charm: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Diko Parvanov (dparv) |
Changed in logrotate-charm: | |
status: | Confirmed → Fix Committed |
Changed in logrotate-charm: | |
status: | Fix Committed → Fix Released |
Proposed MR for bugfix: https:/ /code.launchpad .net/~logrotate -charmers/ logrotate- charm/+ git/logrotate- charm/+ ref/bugs_ 1833095_ 1833093