MCPcopy
hub / github.com/go-git/go-git / TestPushNonExistentRemote

Method TestPushNonExistentRemote

repository_test.go:1752–1761  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

1750}
1751
1752func (s *RepositorySuite) TestPushNonExistentRemote(c *C) {
1753 srcFs := fixtures.Basic().One().DotGit()
1754 sto := filesystem.NewStorage(srcFs, cache.NewObjectLRUDefault())
1755
1756 r, err := Open(sto, srcFs)
1757 c.Assert(err, IsNil)
1758
1759 err = r.Push(&PushOptions{RemoteName: "myremote"})
1760 c.Assert(err, ErrorMatches, ".*remote not found.*")
1761}
1762
1763func (s *RepositorySuite) TestLog(c *C) {
1764 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 4

NewStorageFunction · 0.92
NewObjectLRUDefaultFunction · 0.92
OpenFunction · 0.85
PushMethod · 0.65

Tested by

no test coverage detected