Commit cfc3be2b authored by Jacob Vosmaer's avatar Jacob Vosmaer

Detect cloning an empty repo

parent 76e771f7
......@@ -43,6 +43,11 @@ func TestAllowedClone(t *testing.T) {
// Do the git clone
cloneCmd := exec.Command("git", "clone", remote, path.Join(scratchDir, "test"))
runOrFail(t, cloneCmd)
// We may have cloned an 'empty' repository, 'git show' will fail in it
showCmd := exec.Command("git", "show")
showCmd.Dir = path.Join(scratchDir, "test")
runOrFail(t, showCmd)
}
func TestDeniedClone(t *testing.T) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment