(c *C)
| 847 | } |
| 848 | |
| 849 | func (s *RemoteRepoCollectionSuite) TestUpdateLoadComplete(c *C) { |
| 850 | repo, _ := NewRemoteRepo("yandex", "http://mirror.yandex.ru/debian/", "squeeze", []string{"main"}, []string{}, false, false, false, false) |
| 851 | c.Assert(s.collection.Update(repo), IsNil) |
| 852 | |
| 853 | collection := NewRemoteRepoCollection(s.db) |
| 854 | r, err := collection.ByName("yandex") |
| 855 | c.Assert(err, IsNil) |
| 856 | c.Assert(r.packageRefs, IsNil) |
| 857 | |
| 858 | repo.packageRefs = s.reflist |
| 859 | c.Assert(s.collection.Update(repo), IsNil) |
| 860 | |
| 861 | collection = NewRemoteRepoCollection(s.db) |
| 862 | r, err = collection.ByName("yandex") |
| 863 | c.Assert(err, IsNil) |
| 864 | c.Assert(r.packageRefs, IsNil) |
| 865 | c.Assert(r.NumPackages(), Equals, 0) |
| 866 | c.Assert(s.collection.LoadComplete(r), IsNil) |
| 867 | c.Assert(r.NumPackages(), Equals, 3) |
| 868 | } |
| 869 | |
| 870 | func (s *RemoteRepoCollectionSuite) TestForEachAndLen(c *C) { |
| 871 | repo, _ := NewRemoteRepo("yandex", "http://mirror.yandex.ru/debian/", "squeeze", []string{"main"}, []string{}, false, false, false, false) |
nothing calls this directly
no test coverage detected