aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/report_status_test.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2016-12-09 14:44:03 +0100
committerGitHub <noreply@github.com>2016-12-09 14:44:03 +0100
commit0e1a52757a3938e97cf7d31e0dff3c9949001763 (patch)
tree8b998fdc3eaaf6b2d6c69a125759a778664207a5 /plumbing/protocol/packp/report_status_test.go
parent4f16cc925238aae81586e917d26b8ff6b6a340bd (diff)
downloadgo-git-0e1a52757a3938e97cf7d31e0dff3c9949001763.tar.gz
transport: add git-send-pack support to local/ssh. (#163)
* protocol/packp: add Packfile field to ReferenceUpdateRequest. * protocol/packp: add NewReferenceUpdateRequestFromCapabilities. * NewReferenceUpdateRequestFromCapabilities can be used to create a ReferenceUpdateRequest with initial capabilities compatible with the server. * protocol/packp: fix new line handling on report status. * transport/file: test error on unexisting command.
Diffstat (limited to 'plumbing/protocol/packp/report_status_test.go')
-rw-r--r--plumbing/protocol/packp/report_status_test.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/plumbing/protocol/packp/report_status_test.go b/plumbing/protocol/packp/report_status_test.go
index 064e514..168d25b 100644
--- a/plumbing/protocol/packp/report_status_test.go
+++ b/plumbing/protocol/packp/report_status_test.go
@@ -69,8 +69,8 @@ func (s *ReportStatusSuite) TestEncodeDecodeOkOneReference(c *C) {
}}
s.testEncodeDecodeOk(c, rs,
- "unpack ok",
- "ok refs/heads/master",
+ "unpack ok\n",
+ "ok refs/heads/master\n",
pktline.FlushString,
)
}
@@ -84,8 +84,8 @@ func (s *ReportStatusSuite) TestEncodeDecodeOkOneReferenceFailed(c *C) {
}}
s.testEncodeDecodeOk(c, rs,
- "unpack my error",
- "ng refs/heads/master command error",
+ "unpack my error\n",
+ "ng refs/heads/master command error\n",
pktline.FlushString,
)
}
@@ -105,10 +105,10 @@ func (s *ReportStatusSuite) TestEncodeDecodeOkMoreReferences(c *C) {
}}
s.testEncodeDecodeOk(c, rs,
- "unpack ok",
- "ok refs/heads/master",
- "ok refs/heads/a",
- "ok refs/heads/b",
+ "unpack ok\n",
+ "ok refs/heads/master\n",
+ "ok refs/heads/a\n",
+ "ok refs/heads/b\n",
pktline.FlushString,
)
}
@@ -128,10 +128,10 @@ func (s *ReportStatusSuite) TestEncodeDecodeOkMoreReferencesFailed(c *C) {
}}
s.testEncodeDecodeOk(c, rs,
- "unpack my error",
- "ok refs/heads/master",
- "ng refs/heads/a command error",
- "ok refs/heads/b",
+ "unpack my error\n",
+ "ok refs/heads/master\n",
+ "ng refs/heads/a command error\n",
+ "ok refs/heads/b\n",
pktline.FlushString,
)
}
@@ -141,7 +141,7 @@ func (s *ReportStatusSuite) TestEncodeDecodeOkNoReferences(c *C) {
expected.UnpackStatus = "ok"
s.testEncodeDecodeOk(c, expected,
- "unpack ok",
+ "unpack ok\n",
pktline.FlushString,
)
}
@@ -151,7 +151,7 @@ func (s *ReportStatusSuite) TestEncodeDecodeOkNoReferencesFailed(c *C) {
rs.UnpackStatus = "my error"
s.testEncodeDecodeOk(c, rs,
- "unpack my error",
+ "unpack my error\n",
pktline.FlushString,
)
}
@@ -165,8 +165,8 @@ func (s *ReportStatusSuite) TestDecodeErrorOneReferenceNoFlush(c *C) {
}}
s.testDecodeError(c, "missing flush",
- "unpack ok",
- "ok refs/heads/master",
+ "unpack ok\n",
+ "ok refs/heads/master\n",
)
}
@@ -190,7 +190,7 @@ func (s *ReportStatusSuite) TestDecodeErrorMalformed(c *C) {
}}
s.testDecodeError(c, "malformed unpack status: unpackok",
- "unpackok",
+ "unpackok\n",
pktline.FlushString,
)
}
@@ -204,7 +204,7 @@ func (s *ReportStatusSuite) TestDecodeErrorMalformed2(c *C) {
}}
s.testDecodeError(c, "malformed unpack status: UNPACK OK",
- "UNPACK OK",
+ "UNPACK OK\n",
pktline.FlushString,
)
}
@@ -218,8 +218,8 @@ func (s *ReportStatusSuite) TestDecodeErrorMalformedCommandStatus(c *C) {
}}
s.testDecodeError(c, "malformed command status: ko refs/heads/master",
- "unpack ok",
- "ko refs/heads/master",
+ "unpack ok\n",
+ "ko refs/heads/master\n",
pktline.FlushString,
)
}
@@ -233,8 +233,8 @@ func (s *ReportStatusSuite) TestDecodeErrorMalformedCommandStatus2(c *C) {
}}
s.testDecodeError(c, "malformed command status: ng refs/heads/master",
- "unpack ok",
- "ng refs/heads/master",
+ "unpack ok\n",
+ "ng refs/heads/master\n",
pktline.FlushString,
)
}