(c *C)
| 504 | } |
| 505 | |
| 506 | func (s *SuiteCommit) TestPatchCancel(c *C) { |
| 507 | from := s.commit(c, plumbing.NewHash("918c48b83bd081e863dbe1b80f8998f058cd8294")) |
| 508 | to := s.commit(c, plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5")) |
| 509 | |
| 510 | ctx, cancel := context.WithCancel(context.Background()) |
| 511 | cancel() |
| 512 | patch, err := from.PatchContext(ctx, to) |
| 513 | c.Assert(patch, IsNil) |
| 514 | c.Assert(err, ErrorMatches, "operation canceled") |
| 515 | |
| 516 | } |
| 517 | |
| 518 | func (s *SuiteCommit) TestMalformedHeader(c *C) { |
| 519 | encoded := &plumbing.MemoryObject{} |
nothing calls this directly
no test coverage detected