← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~pappacena/launchpad:fix-flags-for-oci-recipe-init into launchpad:master

 

Thiago F. Pappacena has proposed merging ~pappacena/launchpad:fix-flags-for-oci-recipe-init into launchpad:master.

Commit message:
Adding the feature flag to enable OCI Recipe creation in some more tests to fix them.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/381598
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:fix-flags-for-oci-recipe-init into launchpad:master.
diff --git a/lib/lp/archiveuploader/tests/test_ocirecipeupload.py b/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
index d80be3a..bae4f4a 100644
--- a/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
+++ b/lib/lp/archiveuploader/tests/test_ocirecipeupload.py
@@ -20,14 +20,17 @@ from lp.archiveuploader.uploadprocessor import (
     UploadStatusEnum,
     )
 from lp.buildmaster.enums import BuildStatus
-from lp.services.propertycache import get_property_cache
+from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
+from lp.services.features.testing import FeatureFixture
 from lp.services.osutils import write_file
+from lp.services.propertycache import get_property_cache
 
 
 class TestOCIRecipeUploads(TestUploadProcessorBase):
 
     def setUp(self):
         super(TestOCIRecipeUploads, self).setUp()
+        self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
 
         self.setupBreezy()
 
diff --git a/lib/lp/oci/tests/test_ocirecipebuildjob.py b/lib/lp/oci/tests/test_ocirecipebuildjob.py
index 2b2d45c..cf85684 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildjob.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildjob.py
@@ -7,13 +7,14 @@ from __future__ import absolute_import, print_function, unicode_literals
 
 __metaclass__ = type
 
-
+from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
 from lp.oci.interfaces.ocirecipebuildjob import IOCIRecipeBuildJob
 from lp.oci.model.ocirecipebuildjob import (
     OCIRecipeBuildJob,
     OCIRecipeBuildJobDerived,
     OCIRecipeBuildJobType,
     )
+from lp.services.features.testing import FeatureFixture
 from lp.testing import TestCaseWithFactory
 from lp.testing.layers import DatabaseFunctionalLayer
 
@@ -26,6 +27,10 @@ class TestOCIRecipeBuildJob(TestCaseWithFactory):
 
     layer = DatabaseFunctionalLayer
 
+    def setUp(self):
+        super(TestOCIRecipeBuildJob, self).setUp()
+        self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: 'on'}))
+
     def test_provides_interface(self):
         oci_build = self.factory.makeOCIRecipeBuild()
         self.assertProvides(