MCPcopy Index your code
hub / github.com/go-git/go-git / TestObjectNotFound

Method TestObjectNotFound

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

Source from the content-addressed store, hash-verified

3099}
3100
3101func (s *RepositorySuite) TestObjectNotFound(c *C) {
3102 r, _ := Init(memory.NewStorage(), nil)
3103 err := r.clone(context.Background(), &CloneOptions{URL: s.GetBasicLocalRepositoryURL()})
3104 c.Assert(err, IsNil)
3105
3106 hash := plumbing.NewHash("0a3fb06ff80156fb153bcdcc58b5e16c2d27625c")
3107 tag, err := r.Object(plumbing.TagObject, hash)
3108 c.Assert(err, DeepEquals, plumbing.ErrObjectNotFound)
3109 c.Assert(tag, IsNil)
3110}
3111
3112func (s *RepositorySuite) TestWorktree(c *C) {
3113 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