(c *C)
| 147 | } |
| 148 | |
| 149 | func (s *RemoteRepoSuite) TestAppStreamPaths(c *C) { |
| 150 | s.repo.ReleaseFiles = nil |
| 151 | c.Check(s.repo.AppStreamPaths("main"), DeepEquals, []string(nil)) |
| 152 | |
| 153 | s.repo.ReleaseFiles = map[string]utils.ChecksumInfo{ |
| 154 | "main/binary-amd64/Packages": {Size: 100}, |
| 155 | "main/dep11/Components-amd64.yml.gz": {Size: 200}, |
| 156 | "main/dep11/Components-i386.yml.gz": {Size: 300}, |
| 157 | "main/dep11/icons-48x48.tar.gz": {Size: 400}, |
| 158 | "contrib/dep11/Components-amd64.yml.gz": {Size: 500}, |
| 159 | "main/source/Sources": {Size: 600}, |
| 160 | } |
| 161 | |
| 162 | paths := s.repo.AppStreamPaths("main") |
| 163 | c.Check(paths, DeepEquals, []string{ |
| 164 | "main/dep11/Components-amd64.yml.gz", |
| 165 | "main/dep11/Components-i386.yml.gz", |
| 166 | "main/dep11/icons-48x48.tar.gz", |
| 167 | }) |
| 168 | |
| 169 | paths = s.repo.AppStreamPaths("contrib") |
| 170 | c.Check(paths, DeepEquals, []string{ |
| 171 | "contrib/dep11/Components-amd64.yml.gz", |
| 172 | }) |
| 173 | |
| 174 | paths = s.repo.AppStreamPaths("non-free") |
| 175 | c.Check(paths, DeepEquals, []string(nil)) |
| 176 | |
| 177 | s.repo.ReleaseFiles = map[string]utils.ChecksumInfo{} |
| 178 | c.Check(s.repo.AppStreamPaths("main"), DeepEquals, []string(nil)) |
| 179 | } |
| 180 | |
| 181 | func (s *RemoteRepoSuite) TestNumPackages(c *C) { |
| 182 | c.Check(s.repo.NumPackages(), Equals, 0) |
nothing calls this directly
no test coverage detected