govanityurls
govanityurls copied to clipboard
add integration tests
This test verifies that the output from this system is usable by the go get
tool. It operates by proxying go get
HTTP requests to a locally
running proxy, then checking the URL the VCS cloned from.
This isn't a hermetic test: it requires internet access to github.com and bitbucket.org, which I'm not sure how to reasonably fake and provide the same level of confidence. It checks PATH for locally installed copies of go, git, and hg, but those could be bundled in a test environment.
I bumped up the version of Go required/tested against to Go 1.8 in order to use subtests. Go 1.8 is now GA on App Engine, so this should not be a problem.
@rakyll ping
I didn't truly understand why we need to verify go get requests. Don't we instead need to test manually cloning and go get'in from the vanity URL and assert whether the downloaded repo is the same?
The reason I'm not checking the contents of the checkout right now is because the repository could change while the test is running, since the test is not hermetic. I agree that it would be good to check the commit, especially since I'm building toward the feature I described in #17 and want to build confidence that it works. Perhaps I should bite the bullet and have the test spin up a local Git HTTP server?