The proposal to merge lp:~sinzui/launchpad/commercial-jobsource-zcml into lp:launchpad has been updated.
Description changed to: process-job-source.py fails because the commercial notification classes are not registered in ZCML. Clearly, a test is missing that demonstrates the ZCML, schema-lazr.conf, and security.cfg are configured properly. I really botched this. I new what test was missing when I discovered the bug. There are two cronscripts used in this process, and I only wrote tests for the script I wrote. I need to also write a test for the script I reused. -------------------------------------------------------------------- RULES Pre-implementation: no one * Add the missing ZCML needed to register the secured utilities. * Add tests to verify the three kinds of job are run. * Fix any db permissions that are proven to fail. * Fix the ICommercialExpiredJob to be ICommercialExpiredJobSource in the schema. QA On qastaging, as a webops to run * cronscripts/process-job-source.py ICommercialExpiredJobSource * cronscripts/process-job-source.py ISevenDayCommercialExpirationJobSource * cronscripts/process-job-source.py IThirtyDayCommercialExpirationJobSource LINT cronscripts/daily_product_jobs.py database/schema/security.cfg lib/lp/registry/configure.zcml lib/lp/registry/model/productjob.py lib/lp/registry/tests/test_productjob.py lib/lp/services/config/schema-lazr.conf TEST ./bin/test -vvc lp.registry.tests.test_productjob IMPLEMENTATION Fixed the class name used to lookup jobs ICommercialExpiredJob => ICommercialExpiredJobSource cronscripts/daily_product_jobs.py lib/lp/services/config/schema-lazr.conf Added a test to the test mixin to verify that the three kinds of commercial notification job can be run by process-job-source.py. I discovered that there is two run_script() test helpers with different IO. I chose to use update an existing test to use the one from lp.testing because it allows me to pass the environ to get better test output. lib/lp/registry/model/productjob.py lib/lp/registry/tests/test_productjob.py Added the missing ZCML registration that permits process-job-source.py to lookup the job source class and then have permission to use the job instance. lib/lp/registry/configure.zcml Fixed the db permissions demonstrated to be need by the new test. The packaging/distro tables are needed because there is a sanity check in the product deactivation code that ensure Ubuntu does not loose an upstream packaging link database/schema/security.cfg For more details, see: https://code.launchpad.net/~sinzui/launchpad/commercial-jobsource-zcml/+merge/110365 -- https://code.launchpad.net/~sinzui/launchpad/commercial-jobsource-zcml/+merge/110365 Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/commercial-jobsource-zcml into lp:launchpad. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

