~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/tests/test_distroseriesdifferencejob.py

  • Committer: Raphael Badin
  • Date: 2011-07-27 10:34:53 UTC
  • mto: This revision was merged to the branch mainline in revision 13552.
  • Revision ID: raphael.badin@canonical.com-20110727103453-3v25z6xwpsshojx5
Remove optionnal parent_series parameter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
        # two jobs. One for derived_series, and the other for its child.
267
267
        self.getJobSource().createForPackagePublication(
268
268
            parent_dsp.derived_series, package,
269
 
            PackagePublishingPocket.RELEASE, parent_dsp.parent_series)
 
269
            PackagePublishingPocket.RELEASE)
270
270
        jobs = sum([
271
271
            find_waiting_jobs(dsp.derived_series, package, dsp.parent_series)
272
272
            for dsp in [parent_dsp, parent_dsp]],
279
279
        dsp = self.factory.makeDistroSeriesParent()
280
280
        package = self.factory.makeSourcePackageName()
281
281
        self.getJobSource().createForPackagePublication(
282
 
            dsp.derived_series, package, PackagePublishingPocket.RELEASE,
283
 
            dsp.parent_series)
 
282
            dsp.derived_series, package, PackagePublishingPocket.RELEASE)
284
283
        jobs = find_waiting_jobs(
285
284
            dsp.derived_series, package, dsp.parent_series)
286
285
        self.assertEqual(
291
290
        package = self.factory.makeSourcePackageName()
292
291
        self.useFixture(FeatureFixture({FEATURE_FLAG_ENABLE_MODULE: ''}))
293
292
        self.getJobSource().createForPackagePublication(
294
 
            dsp.derived_series, package, PackagePublishingPocket.RELEASE,
295
 
            dsp.parent_series)
 
293
            dsp.derived_series, package, PackagePublishingPocket.RELEASE)
296
294
        self.assertContentEqual(
297
295
            [],
298
296
            find_waiting_jobs(dsp.derived_series, package, dsp.parent_series))
301
299
        dsp = self.factory.makeDistroSeriesParent()
302
300
        package = self.factory.makeSourcePackageName()
303
301
        self.getJobSource().createForPackagePublication(
304
 
            dsp.derived_series, package, PackagePublishingPocket.BACKPORTS,
305
 
            dsp.parent_series)
 
302
            dsp.derived_series, package, PackagePublishingPocket.BACKPORTS)
306
303
        self.getJobSource().createForPackagePublication(
307
 
            dsp.derived_series, package, PackagePublishingPocket.PROPOSED,
308
 
            dsp.parent_series)
 
304
            dsp.derived_series, package, PackagePublishingPocket.PROPOSED)
309
305
        self.assertContentEqual(
310
306
            [],
311
307
            find_waiting_jobs(dsp.derived_series, package, dsp.parent_series))
314
310
        self.useFixture(FeatureFixture({FEATURE_FLAG_ENABLE_MODULE: ''}))
315
311
        dsp = self.factory.makeDistroSeriesParent()
316
312
        spph = self.createSPPHs(dsp.derived_series, 1)[0]
317
 
        self.getJobSource().massCreateForSeries(
318
 
            dsp.derived_series, dsp.parent_series)
 
313
        self.getJobSource().massCreateForSeries(dsp.derived_series)
319
314
 
320
315
        self.assertContentEqual(
321
316
            [],
392
387
        dsp = self.factory.makeDistroSeriesParent()
393
388
        package = self.factory.makeSourcePackageName()
394
389
        self.getJobSource().createForPackagePublication(
395
 
            dsp.derived_series, package, PackagePublishingPocket.RELEASE,
396
 
            dsp.parent_series)
 
390
            dsp.derived_series, package, PackagePublishingPocket.RELEASE)
397
391
        # Make changes visible to the process we'll be spawning.
398
392
        transaction.commit()
399
393
        return_code, stdout, stderr = run_script(
412
406
        dsp = self.factory.makeDistroSeriesParent()
413
407
        package = self.factory.makeSourcePackageName()
414
408
        job = self.getJobSource().createForPackagePublication(
415
 
            dsp.derived_series, package, PackagePublishingPocket.RELEASE,
416
 
            dsp.parent_series)
 
409
            dsp.derived_series, package, PackagePublishingPocket.RELEASE)
417
410
        job[0].start()
418
411
        job[0].run()
419
412
        # Complete the job so we can create another.
422
415
        self.assertEqual(1, find_dsd_for(dsp, package).count())
423
416
        # If we run the job again, it will not create another DSD.
424
417
        job = self.getJobSource().createForPackagePublication(
425
 
            dsp.derived_series, package, PackagePublishingPocket.RELEASE,
426
 
            dsp.parent_series)
 
418
            dsp.derived_series, package, PackagePublishingPocket.RELEASE)
427
419
        job[0].start()
428
420
        job[0].run()
429
421
        self.assertEqual(1, find_dsd_for(dsp, package).count())