aboutsummaryrefslogtreecommitdiffstats
path: root/clients/common/common_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-10-30 11:07:26 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2015-10-30 11:07:26 +0100
commitfcbb68e3658a7929fe4f7e306fa8e9b602ff48f3 (patch)
tree01bbdabbe3cf0a00d86b1d0c44b92dffcb389ad3 /clients/common/common_test.go
parent419ea1639230c5a7613962cbcbe0eb8b9e1ad078 (diff)
downloadgo-git-fcbb68e3658a7929fe4f7e306fa8e9b602ff48f3.tar.gz
client: handly empty repositories
Diffstat (limited to 'clients/common/common_test.go')
-rw-r--r--clients/common/common_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/clients/common/common_test.go b/clients/common/common_test.go
index 43faf5b..b397ac9 100644
--- a/clients/common/common_test.go
+++ b/clients/common/common_test.go
@@ -53,6 +53,12 @@ func (s *SuiteCommon) TestGitUploadPackInfo(c *C) {
c.Assert(info.Refs[ref].Name, Equals, "refs/heads/master")
}
+func (s *SuiteCommon) TestGitUploadPackInfoEmpty(c *C) {
+ b := bytes.NewBuffer(nil)
+ _, err := NewGitUploadPackInfo(pktline.NewDecoder(b))
+ c.Assert(err, ErrorMatches, "permanent.*empty.*")
+}
+
func (s *SuiteCommon) TestGitUploadPackRequest(c *C) {
r := &GitUploadPackRequest{
Want: []internal.Hash{