(c *C)
| 3111 | } |
| 3112 | |
| 3113 | func (s *RepositorySuite) TestObjects(c *C) { |
| 3114 | r, _ := Init(memory.NewStorage(), nil) |
| 3115 | err := r.clone(context.Background(), &CloneOptions{URL: s.GetBasicLocalRepositoryURL()}) |
| 3116 | c.Assert(err, IsNil) |
| 3117 | |
| 3118 | count := 0 |
| 3119 | objects, err := r.Objects() |
| 3120 | c.Assert(err, IsNil) |
| 3121 | for { |
| 3122 | o, err := objects.Next() |
| 3123 | if err != nil { |
| 3124 | break |
| 3125 | } |
| 3126 | |
| 3127 | count++ |
| 3128 | c.Assert(o.ID().IsZero(), Equals, false) |
| 3129 | c.Assert(o.Type(), Not(Equals), plumbing.AnyObject) |
| 3130 | } |
| 3131 | |
| 3132 | c.Assert(count, Equals, 31) |
| 3133 | } |
| 3134 | |
| 3135 | func (s *RepositorySuite) TestObjectNotFound(c *C) { |
| 3136 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected