make test: ImportError: No module named http
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Elasticsearch Charm |
Fix Released
|
Low
|
Joe Guo |
Bug Description
`make test` will fail with:
> $ make test [±master ●]
Starting unit tests...
Traceback (most recent call last):
File "unit_tests/
from hooks import hooks
File "/home/
import http
ImportError: No module named http
Makefile:12: recipe for target 'test' failed
make: *** [test] Error 1
A few issues here:
1. `http` is builtin lib in python3, but not in python2
2. according to Makefile, `make test` will run tests with python2
3. in `hooks.py`, the only place using `http` module is for a `HTTPStatus.OK` code(200), which could be easily avoided.
Changed in charm-elasticsearch: | |
importance: | Undecided → Low |
assignee: | nobody → Joe Guo (guoqiao) |
status: | New → In Progress |
Changed in charm-elasticsearch: | |
status: | In Progress → Fix Committed |
milestone: | none → 20.05 |
Changed in charm-elasticsearch: | |
status: | Fix Committed → Fix Released |