Comment 4 for bug 1413776

Revision history for this message
Matt Bruzek (mbruzek) wrote :

I took a look at this charm as well and had the same error when running make lint. Looking at the Makefile, I see the lint target looking for the file docs/faux-inventory.conf but I see no file like that in the charm.

Both python tests also fail.

# 10-deploy.py

The test calls out a local:trusty/docker charm that was not on my system when I ran the tests. I would recommend changing the charm to deploy the personal namespaced charm cs:~lazypower/trusty/docker so the test can pass in automation.

The setUpClass method is decorated as a @classmethod, but uses an argument named "self". According to the docs (https://docs.python.org/2/library/functions.html#classmethod) a class method receives the class as the first argument. I would recommend renaming the variable "cls" to follow convention here. This may seem like a nit, but I recently discovered this difference when debugging a nasty error in the setUpClass() method of my own tests, and got better results when I realized the agument was *not* an instance of the class but the class object itself. I have also been writing this tests using the argument "self" incorrectly, so you might have seen one of my tests use it incorrectly.

# 99-autogen

This test also fails in bundletester and since you have a real test (10-deploy.py) I would recommend removing the file. Before you delete the file please notice that the setUpClass method correctly uses the cls variable.

Let me know when you make the updates and I will be happy to review this charm again. Thanks!