MCPcopy Create free account
hub / github.com/go-git/go-git / TestObjectNotFound

Method TestObjectNotFound

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

Source from the content-addressed store, hash-verified

3133}
3134
3135func (s *RepositorySuite) TestObjectNotFound(c *C) {
3136 r, _ := Init(memory.NewStorage(), nil)
3137 err := r.clone(context.Background(), &CloneOptions{URL: s.GetBasicLocalRepositoryURL()})
3138 c.Assert(err, IsNil)
3139
3140 hash := plumbing.NewHash("0a3fb06ff80156fb153bcdcc58b5e16c2d27625c")
3141 tag, err := r.Object(plumbing.TagObject, hash)
3142 c.Assert(err, DeepEquals, plumbing.ErrObjectNotFound)
3143 c.Assert(tag, IsNil)
3144}
3145
3146func (s *RepositorySuite) TestWorktree(c *C) {
3147 def := memfs.New()

Callers

nothing calls this directly

Calls 6

NewStorageFunction · 0.92
NewHashFunction · 0.92
InitFunction · 0.85
cloneMethod · 0.80
ObjectMethod · 0.45

Tested by

no test coverage detected