adding unit tests that take a long time

Katherine Cox-Buday katherine.cox-buday at canonical.com
Thu Apr 28 01:12:28 UTC 2016


That is an awesome idea! +1

On 04/27/2016 05:51 PM, Andrew Wilkins wrote:
> On Thu, Apr 28, 2016 at 1:44 AM Nate Finch <nate.finch at canonical.com
> <mailto:nate.finch at canonical.com>> wrote:
>
>     I was actually trying to avoid talking about the test itself to
>     keep things shorter ;)  
>
>     The test is parsing the entire codebase under github.com/juju/juju
>     <http://github.com/juju/juju> to look for places where we're
>     creating a new value of crypto/tls.Config instead of using the new
>     helper function that I wrote that creates one with more secure
>     defaults.  There's not really any getting around the fact that
>     parsing the whole tree takes a long time.
>
>
> The nature of the test is important here: it's not a test of Juju
> functionality, but a test to ensure that we don't accidentally use a
> TLS configuration that doesn't match our project-wide constraints.
> It's static analysis, using the test framework; and FWIW, the sort of
> thing that Lingo would be a good fit for.
>
> I'd suggest that we *do* organise things like this separately, and run
> them as part of the "scripts/verify.sh" script. This is the sort of
> test that you shouldn't need to run often, but I'd like us to gate
> merges on.
>
> Cheers,
> Andrew
>  
>
>     On Wed, Apr 27, 2016 at 1:25 PM Nicholas Skaggs
>     <nicholas.skaggs at canonical.com
>     <mailto:nicholas.skaggs at canonical.com>> wrote:
>
>         This is a timely discussion Nate. I'll avoid saying too much
>         off the
>         top, but I do have a question.
>
>         On 04/27/2016 12:24 PM, Nate Finch wrote:
>         > I just wrote a test that takes ~16.5 seconds on my machine.
>         Why does the test take so long? Are you intending it to be a
>         short /
>         small scoped test?
>
>         Nicholas
>
>     --
>     Juju-dev mailing list
>     Juju-dev at lists.ubuntu.com <mailto:Juju-dev at lists.ubuntu.com>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
>

-- 
-
Katherine

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20160427/7c1537db/attachment-0001.html>


More information about the Juju-dev mailing list