Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add integration tests #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zombiezen
Copy link
Contributor

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.

@zombiezen zombiezen requested a review from rakyll January 29, 2018 18:24
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.
@zombiezen
Copy link
Contributor Author

@rakyll ping

@rakyll
Copy link
Contributor

rakyll commented Mar 2, 2018

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?

@zombiezen
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants