juju/juju — pull request #495 by natefinch (2014-08-11 20:29:37+00:00)
Title: ...

run godeps -t ./... as a test and ensure that dependencies.tsv agrees with what godeps outputs.

This will fail if a dev hasn't run godeps -u, it will also fail if someone adds a dependency on a new external repo and doesn't specify it in dependencies.tsv.

The nice thing is, this is one of the first tests that'll run if you're doing go test ./... from the root directory, so it should alert you right away if something is wrong.

I also simplified the other test a little...tests always run in the current directory, so you don't have to bend over backwards to read a file in the same directory, just read it.

This has only one added precondition that didn't exist before - godeps must be in your path. Everyone contributing must have godeps in order to create a valid development environment, but in theory someone may have it in some directory that is not in their path. I think the added requirement is perfectly acceptable in order to add this level of insurance to our build.

The other option is we could call it as $GOPATH/bin/godeps which would require you to have used go install, but doesn't force it to be in the path. Not sure which would be deemed less offensive.