Had to dig through the code a bit before finding out what was happening.
In deployer the name of the directory you're in becomes the default charm name that is looked up when determining the charm path. In my case my cwd was /home/ubuntu and I was trying to add the Ubuntu charm to my Amulet test. But every time I was running the test I ended up with Exception: Charm not found.
Had to dig through the code a bit before finding out what was happening.
In deployer the name of the directory you're in becomes the default charm name that is looked up when determining the charm path. In my case my cwd was
/home/ubuntu
and I was trying to add the Ubuntu charm to my Amulet test. But every time I was running the test I ended up withException: Charm not found
.The reason was that it was trying to lookup the charm as a local charm rather than from the charmstore due to https://github.com/juju/amulet/blob/master/amulet/charm.py#L54 and then https://github.com/juju/amulet/blob/master/amulet/charm.py#L39.
Fixed it by setting the
JUJU_TEST_CHARM
environment variable, but it wasn't very obvious from the get go what was going on.