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

Method TestDeleteRemote

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

Source from the content-addressed store, hash-verified

383}
384
385func (s *RepositorySuite) TestDeleteRemote(c *C) {
386 r, _ := Init(memory.NewStorage(), nil)
387 _, err := r.CreateRemote(&config.RemoteConfig{
388 Name: "foo",
389 URLs: []string{"http://foo/foo.git"},
390 })
391
392 c.Assert(err, IsNil)
393
394 err = r.DeleteRemote("foo")
395 c.Assert(err, IsNil)
396
397 alt, err := r.Remote("foo")
398 c.Assert(err, Equals, ErrRemoteNotFound)
399 c.Assert(alt, IsNil)
400}
401
402func (s *RepositorySuite) TestEmptyCreateBranch(c *C) {
403 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 5

NewStorageFunction · 0.92
InitFunction · 0.85
CreateRemoteMethod · 0.80
DeleteRemoteMethod · 0.80
RemoteMethod · 0.80

Tested by

no test coverage detected