FYI, a few new testing functions and a package

John Meinel john at arbash-meinel.com
Fri Aug 2 05:14:39 UTC 2013


Wouldnt that mean you'd want it in gocheck itself?

John
=:->
On Aug 2, 2013 8:21 AM, "Tim Penhey" <tim.penhey at canonical.com> wrote:

> On 02/08/13 16:17, Ian Booth wrote:
> >>
> >>  testing.PatchEnvironment
> >>
> >> This method sets the environment variable with the specified value, and
> >> returns a function that will set it back to what it was.  Simply used in
> >> a test like this:
> >>
> >> defer coretesting.PatchEnvironment(osenv.JujuLxcBridge, "br0")()
> >>
> >>
> >
> > We have something similar in Goose. Which made me wonder what our policy
> is with
> > respect to collecting these sorts of useful utilities and packaging them
> so that
> > they are usable for more than just project X or Y individually. Even
> within
> > juju-core there's duplicated utility code to make up for Go's lack of
> this or
> > that feature. Usable errors is another example of Goose and juju-core
> solving
> > the same problem twice. There would be more as well I'm sure.
> >
> > Is it worth trying to do something to package this common functionality?
> Or will
> > it be too hard due to Go's lack of dependency versioning? I really am
> adverse to
> > all the DRY violations / duplication in our collective code base.
> >
>
> launchpad.net/got ?
>
> go t(esting)
>
> /me shrugs
>
> Makes sense to have common testing package across projects.
>
> Which would make me want to move the checkers into that too.
>
> Tim
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20130802/0db6bee0/attachment-0001.html>


More information about the Juju-dev mailing list