juju / amulet

Testing harness and tools for Juju Charms
Other
17 stars 33 forks source link

Add the juju 2.0 ability to use resources in Amulet #142

Open mbruzek opened 8 years ago

mbruzek commented 8 years ago

I am trying to develop tests for a charm that only uses the juju 2.0 resources feature. The charm fails to find the resource and does not install the package. The amulet code should have some way to add and remove resources to test these kind of charms.

Relevant information:

The charm command resource-get will fetch a resource from the Juju controller or the Juju Charm store

Please note there are two types of commands, the juju resource commands and the charm resource commands. The juju resource commands only attach, or list resources for the current controller. The charm commands attach and retrieve from the Charm Store.

I suspect that an MVP for Amulet will not include attaching resources, but we will need to test resource-get from both the controller and Charm Store.

johnsca commented 8 years ago

To test fetching from the controller, it seems like you would need the ability to push them to the controller first.

simonklb commented 7 years ago

I'm also trying to create a test for a charm that uses resources. Curious, did you work around this somehow or have you put it on hold until support for resources is implemented?

johnsca commented 7 years ago

This is a pretty significant issue because it prevents testing any charms that have resources. Because Amulet is intended to test a charm during dev, it almost always deploys the charm in question from a local copy which causes the charm store resources to not be used. We need a way to tell Amulet, "you're using a local copy of this charm store URL, so use those remote resources."

rmescandon commented 6 years ago

What's the status of this?. Is there any way to workaround it?