(c *C)
| 1669 | } |
| 1670 | |
| 1671 | func (s *RepositorySuite) TestPushContext(c *C) { |
| 1672 | url, clean := s.TemporalDir() |
| 1673 | defer clean() |
| 1674 | |
| 1675 | _, err := PlainInit(url, true) |
| 1676 | c.Assert(err, IsNil) |
| 1677 | |
| 1678 | _, err = s.Repository.CreateRemote(&config.RemoteConfig{ |
| 1679 | Name: "foo", |
| 1680 | URLs: []string{url}, |
| 1681 | }) |
| 1682 | c.Assert(err, IsNil) |
| 1683 | |
| 1684 | ctx, cancel := context.WithCancel(context.Background()) |
| 1685 | cancel() |
| 1686 | |
| 1687 | err = s.Repository.PushContext(ctx, &PushOptions{ |
| 1688 | RemoteName: "foo", |
| 1689 | }) |
| 1690 | c.Assert(err, NotNil) |
| 1691 | } |
| 1692 | |
| 1693 | // installPreReceiveHook installs a pre-receive hook in the .git |
| 1694 | // directory at path which prints message m before exiting |
nothing calls this directly
no test coverage detected