launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24551
[Merge] ~pappacena/launchpad:oci-create-test-toggle-fix into launchpad:master
Thiago F. Pappacena has proposed merging ~pappacena/launchpad:oci-create-test-toggle-fix into launchpad:master.
Commit message:
Setting on some test cases the feature toggle that allows us to create OCIRecipe, to fix broken build.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/381595
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:oci-create-test-toggle-fix into launchpad:master.
diff --git a/lib/lp/services/webhooks/tests/test_browser.py b/lib/lp/services/webhooks/tests/test_browser.py
index 95ff526..2d64d84 100644
--- a/lib/lp/services/webhooks/tests/test_browser.py
+++ b/lib/lp/services/webhooks/tests/test_browser.py
@@ -16,7 +16,8 @@ from testtools.matchers import (
import transaction
from zope.component import getUtility
-from lp.oci.interfaces.ocirecipe import OCI_RECIPE_WEBHOOKS_FEATURE_FLAG
+from lp.oci.interfaces.ocirecipe import OCI_RECIPE_WEBHOOKS_FEATURE_FLAG, \
+ OCI_RECIPE_ALLOW_CREATE
from lp.services.features.testing import FeatureFixture
from lp.services.webapp.interfaces import IPlacelessAuthUtility
from lp.services.webapp.publisher import canonical_url
@@ -146,6 +147,7 @@ class OCIRecipeTestHelpers:
self.useFixture(FeatureFixture({
'webhooks.new.enabled': 'true',
OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: 'on',
+ OCI_RECIPE_ALLOW_CREATE: 'on'
}))
owner = self.factory.makePerson()
return self.factory.makeOCIRecipe(registrant=owner, owner=owner)
diff --git a/lib/lp/services/webhooks/tests/test_model.py b/lib/lp/services/webhooks/tests/test_model.py
index e8810f2..b8ee32e 100644
--- a/lib/lp/services/webhooks/tests/test_model.py
+++ b/lib/lp/services/webhooks/tests/test_model.py
@@ -13,7 +13,8 @@ from zope.security.checker import getChecker
from zope.security.proxy import removeSecurityProxy
from lp.app.enums import InformationType
-from lp.oci.interfaces.ocirecipe import OCI_RECIPE_WEBHOOKS_FEATURE_FLAG
+from lp.oci.interfaces.ocirecipe import OCI_RECIPE_WEBHOOKS_FEATURE_FLAG, \
+ OCI_RECIPE_ALLOW_CREATE
from lp.registry.enums import BranchSharingPolicy
from lp.services.database.interfaces import IStore
from lp.services.features.testing import FeatureFixture
@@ -425,6 +426,7 @@ class TestWebhookSetOCIRecipe(TestWebhookSetBase, TestCaseWithFactory):
if owner is None:
owner = self.factory.makePerson()
- with FeatureFixture({OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on"}):
+ with FeatureFixture({OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
+ OCI_RECIPE_ALLOW_CREATE: 'on'}):
return self.factory.makeOCIRecipe(
registrant=owner, owner=owner, **kwargs)