(c *C)
| 3077 | } |
| 3078 | |
| 3079 | func (s *RepositorySuite) TestObjects(c *C) { |
| 3080 | r, _ := Init(memory.NewStorage(), nil) |
| 3081 | err := r.clone(context.Background(), &CloneOptions{URL: s.GetBasicLocalRepositoryURL()}) |
| 3082 | c.Assert(err, IsNil) |
| 3083 | |
| 3084 | count := 0 |
| 3085 | objects, err := r.Objects() |
| 3086 | c.Assert(err, IsNil) |
| 3087 | for { |
| 3088 | o, err := objects.Next() |
| 3089 | if err != nil { |
| 3090 | break |
| 3091 | } |
| 3092 | |
| 3093 | count++ |
| 3094 | c.Assert(o.ID().IsZero(), Equals, false) |
| 3095 | c.Assert(o.Type(), Not(Equals), plumbing.AnyObject) |
| 3096 | } |
| 3097 | |
| 3098 | c.Assert(count, Equals, 31) |
| 3099 | } |
| 3100 | |
| 3101 | func (s *RepositorySuite) TestObjectNotFound(c *C) { |
| 3102 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected