Jujulabs: stubbing out juju commands to test

Kapil Thangavelu kapil.thangavelu at canonical.com
Tue Sep 17 22:48:44 UTC 2013


Specifically for juju-log, its a bit extraneous as std out/err for a charm
hook execution is captured regardless. The only distinction for juju-log is
being able to capture the level associated to an output msg.


On Wed, Sep 18, 2013 at 7:36 AM, Aaron Evans <aarone at one-shore.com> wrote:

> Hi, I'm new to juju.
>
> I'm wondering if there is a way to stub out commands in your install
> script, etc
>
> specifically I'm thinking of replacing juju-log with a function that looks
> like this in my scripts:
>
> log() {
> if hash juju-log 2>/dev/null; then
> juju-log $@
> else
>  echo log: $@
> fi
> }
>
>
> Thoughts?
>
> -Aaron Evans
> http://one-shore.com
>
> --
> JujuLabs mailing list
> JujuLabs at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/jujulabs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/jujulabs/attachments/20130918/6edc07a2/attachment.html>


More information about the JujuLabs mailing list