示例#1
0
 def test_cdimage_mirror_probe_function(self):
     mirror1 = DistributionMirror.byName('releases-mirror')
     mirror2 = DistributionMirror.byName('releases-mirror2')
     mirror3 = DistributionMirror.byName('canonical-releases')
     with default_timeout(15.0):
         self._test_one_semaphore_for_each_host(mirror1, mirror2, mirror3,
                                                probe_cdimage_mirror)
 def test_MirrorCDImageSeries_records_are_deleted_before_probing(self):
     mirror = DistributionMirror.byName('releases-mirror2')
     self.failUnless(not mirror.cdimage_series.is_empty())
     # Note that calling this function won't actually probe any mirrors; we
     # need to call reactor.run() to actually start the probing.
     probe_cdimage_mirror(mirror, StringIO(), [], logging)
     self.failUnless(mirror.cdimage_series.is_empty())
 def test_MirrorCDImageSeries_records_are_deleted_before_probing(self):
     mirror = DistributionMirror.byName('releases-mirror2')
     self.failUnless(not mirror.cdimage_series.is_empty())
     # Note that calling this function won't actually probe any mirrors; we
     # need to call reactor.run() to actually start the probing.
     probe_cdimage_mirror(mirror, StringIO(), [], logging)
     self.failUnless(mirror.cdimage_series.is_empty())
示例#4
0
 def test_MirrorCDImageSeries_records_are_deleted_before_probing(self):
     mirror = DistributionMirror.byName('releases-mirror2')
     self.assertNotEqual(0, len(mirror.cdimage_series))
     # Note that calling this function won't actually probe any mirrors; we
     # need to call reactor.run() to actually start the probing.
     with default_timeout(15.0):
         probe_cdimage_mirror(mirror, StringIO(), [], logging)
     self.assertEqual(0, len(mirror.cdimage_series))
 def test_archive_mirror_probe_function(self):
     mirror1 = DistributionMirror.byName('archive-mirror')
     mirror2 = DistributionMirror.byName('archive-mirror2')
     mirror3 = DistributionMirror.byName('canonical-archive')
     self._test_one_semaphore_for_each_host(mirror1, mirror2, mirror3,
                                            probe_archive_mirror)
 def test_cdimage_mirror_probe_function(self):
     mirror1 = DistributionMirror.byName('releases-mirror')
     mirror2 = DistributionMirror.byName('releases-mirror2')
     mirror3 = DistributionMirror.byName('canonical-releases')
     self._test_one_semaphore_for_each_host(
         mirror1, mirror2, mirror3, probe_cdimage_mirror)
 def test_archive_mirror_probe_function(self):
     mirror1 = DistributionMirror.byName('archive-mirror')
     mirror2 = DistributionMirror.byName('archive-mirror2')
     mirror3 = DistributionMirror.byName('canonical-archive')
     self._test_one_semaphore_for_each_host(
         mirror1, mirror2, mirror3, probe_archive_mirror)