Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Do tests on Git repositories properly #1

Open
hectorj opened this issue Aug 9, 2015 · 2 comments
Open

Do tests on Git repositories properly #1

hectorj opened this issue Aug 9, 2015 · 2 comments

Comments

@hectorj
Copy link
Owner

hectorj commented Aug 9, 2015

We need to do tests on actual Git repositories and their sub-modules

Problems :

  • Current solution (cloning from Github) makes the tests impossible to run without an internet connection, and potentially slow.
  • Git doesn't let me just commit a repository inside a repository (only as a sub-module, but that's not the same thing)
  • The vendor test takes a remote URL from the package in the GOPATH, and fetches it as a sub-module... That's messed up as I do not control what remote is used in the GOPATH. (could be "fixed" by setting my own GOPATH for the test with a pre-defined repo inside...)

As a temporary solution, I'm gonna zip up the test repo and skip the vendor tests...

Any idea is welcome

@hectorj
Copy link
Owner Author

hectorj commented Aug 15, 2015

After the make-over ( #6 ), new partial solution :
Do not unit tests the git commands themselves, mock them thanks to https://github.com/tsuru/commandmocker

@hectorj
Copy link
Owner Author

hectorj commented Aug 20, 2015

Replaced commandmocker by having a GitService interface, with both a real service and a stub that satisfies it

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

No branches or pull requests

1 participant