Merge ~cjwatson/launchpad:remove-oci-recipe-webhooks-enabled-feature-rule into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: ee95ea5c3d68663a671dd4c9b2c09fe7161485e3
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:remove-oci-recipe-webhooks-enabled-feature-rule
Merge into: launchpad:master
Diff against target: 368 lines (+36/-116)
10 files modified
lib/lp/oci/browser/ocirecipe.py (+1/-7)
lib/lp/oci/interfaces/ocirecipe.py (+0/-2)
lib/lp/oci/subscribers/ocirecipebuild.py (+18/-21)
lib/lp/oci/tests/test_ocirecipe.py (+3/-21)
lib/lp/oci/tests/test_ocirecipebuild.py (+4/-10)
lib/lp/oci/tests/test_ocirecipebuildjob.py (+2/-13)
lib/lp/services/webhooks/tests/test_browser.py (+2/-12)
lib/lp/services/webhooks/tests/test_job.py (+2/-10)
lib/lp/services/webhooks/tests/test_model.py (+2/-10)
lib/lp/services/webhooks/tests/test_webservice.py (+2/-10)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+437043@code.launchpad.net

Commit message

Remove oci.recipe.webhooks.enabled feature rule

Description of the change

It's been enabled everywhere for some time.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
index 0b9f4d2..1e5e06e 100644
--- a/lib/lp/oci/browser/ocirecipe.py
+++ b/lib/lp/oci/browser/ocirecipe.py
@@ -61,7 +61,6 @@ from lp.oci.interfaces.ocipushrule import (
61)61)
62from lp.oci.interfaces.ocirecipe import (62from lp.oci.interfaces.ocirecipe import (
63 OCI_RECIPE_ALLOW_CREATE,63 OCI_RECIPE_ALLOW_CREATE,
64 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
65 IOCIRecipe,64 IOCIRecipe,
66 IOCIRecipeSet,65 IOCIRecipeSet,
67 NoSuchOCIRecipe,66 NoSuchOCIRecipe,
@@ -157,12 +156,7 @@ class OCIRecipeNavigationMenu(NavigationMenu):
157156
158 @enabled_with_permission("launchpad.Edit")157 @enabled_with_permission("launchpad.Edit")
159 def webhooks(self):158 def webhooks(self):
160 return Link(159 return Link("+webhooks", "Manage webhooks", icon="edit")
161 "+webhooks",
162 "Manage webhooks",
163 icon="edit",
164 enabled=bool(getFeatureFlag(OCI_RECIPE_WEBHOOKS_FEATURE_FLAG)),
165 )
166160
167 @enabled_with_permission("launchpad.Edit")161 @enabled_with_permission("launchpad.Edit")
168 def delete(self):162 def delete(self):
diff --git a/lib/lp/oci/interfaces/ocirecipe.py b/lib/lp/oci/interfaces/ocirecipe.py
index 516a0c3..0fbb391 100644
--- a/lib/lp/oci/interfaces/ocirecipe.py
+++ b/lib/lp/oci/interfaces/ocirecipe.py
@@ -21,7 +21,6 @@ __all__ = [
21 "OCIRecipePrivacyMismatch",21 "OCIRecipePrivacyMismatch",
22 "OCI_RECIPE_ALLOW_CREATE",22 "OCI_RECIPE_ALLOW_CREATE",
23 "OCI_RECIPE_BUILD_DISTRIBUTION",23 "OCI_RECIPE_BUILD_DISTRIBUTION",
24 "OCI_RECIPE_WEBHOOKS_FEATURE_FLAG",
25 "UsingDistributionCredentials",24 "UsingDistributionCredentials",
26]25]
2726
@@ -72,7 +71,6 @@ from lp.services.database.constants import DEFAULT
72from lp.services.fields import PersonChoice, PublicPersonChoice71from lp.services.fields import PersonChoice, PublicPersonChoice
73from lp.services.webhooks.interfaces import IWebhookTarget72from lp.services.webhooks.interfaces import IWebhookTarget
7473
75OCI_RECIPE_WEBHOOKS_FEATURE_FLAG = "oci.recipe.webhooks.enabled"
76OCI_RECIPE_ALLOW_CREATE = "oci.recipe.create.enabled"74OCI_RECIPE_ALLOW_CREATE = "oci.recipe.create.enabled"
77OCI_RECIPE_BUILD_DISTRIBUTION = "oci.default_build_distribution"75OCI_RECIPE_BUILD_DISTRIBUTION = "oci.default_build_distribution"
78OCI_RECIPE_PRIVATE_FEATURE_FLAG = "oci.recipe.allow_private"76OCI_RECIPE_PRIVATE_FEATURE_FLAG = "oci.recipe.allow_private"
diff --git a/lib/lp/oci/subscribers/ocirecipebuild.py b/lib/lp/oci/subscribers/ocirecipebuild.py
index abdc541..9ecc7cf 100644
--- a/lib/lp/oci/subscribers/ocirecipebuild.py
+++ b/lib/lp/oci/subscribers/ocirecipebuild.py
@@ -6,10 +6,8 @@
6from zope.component import getUtility6from zope.component import getUtility
77
8from lp.buildmaster.enums import BuildStatus8from lp.buildmaster.enums import BuildStatus
9from lp.oci.interfaces.ocirecipe import OCI_RECIPE_WEBHOOKS_FEATURE_FLAG
10from lp.oci.interfaces.ocirecipebuild import IOCIRecipeBuild9from lp.oci.interfaces.ocirecipebuild import IOCIRecipeBuild
11from lp.oci.interfaces.ocirecipebuildjob import IOCIRegistryUploadJobSource10from lp.oci.interfaces.ocirecipebuildjob import IOCIRegistryUploadJobSource
12from lp.services.features import getFeatureFlag
13from lp.services.scripts import log11from lp.services.scripts import log
14from lp.services.webapp.publisher import canonical_url12from lp.services.webapp.publisher import canonical_url
15from lp.services.webhooks.interfaces import IWebhookSet13from lp.services.webhooks.interfaces import IWebhookSet
@@ -17,26 +15,25 @@ from lp.services.webhooks.payload import compose_webhook_payload
1715
1816
19def _trigger_oci_recipe_build_webhook(build, action):17def _trigger_oci_recipe_build_webhook(build, action):
20 if getFeatureFlag(OCI_RECIPE_WEBHOOKS_FEATURE_FLAG):18 payload = {
21 payload = {19 "recipe_build": canonical_url(build, force_local_path=True),
22 "recipe_build": canonical_url(build, force_local_path=True),20 "action": action,
23 "action": action,21 }
24 }22 payload.update(
25 payload.update(23 compose_webhook_payload(
26 compose_webhook_payload(24 IOCIRecipeBuild,
27 IOCIRecipeBuild,25 build,
28 build,26 [
29 [27 "recipe",
30 "recipe",28 "build_request",
31 "build_request",29 "status",
32 "status",30 "registry_upload_status",
33 "registry_upload_status",31 ],
34 ],
35 )
36 )
37 getUtility(IWebhookSet).trigger(
38 build.recipe, "oci-recipe:build:0.1", payload
39 )32 )
33 )
34 getUtility(IWebhookSet).trigger(
35 build.recipe, "oci-recipe:build:0.1", payload
36 )
4037
4138
42def oci_recipe_build_created(build, event):39def oci_recipe_build_created(build, event):
diff --git a/lib/lp/oci/tests/test_ocirecipe.py b/lib/lp/oci/tests/test_ocirecipe.py
index bc212a2..1d2a7f4 100644
--- a/lib/lp/oci/tests/test_ocirecipe.py
+++ b/lib/lp/oci/tests/test_ocirecipe.py
@@ -36,7 +36,6 @@ from lp.oci.interfaces.ocipushrule import (
36from lp.oci.interfaces.ocirecipe import (36from lp.oci.interfaces.ocirecipe import (
37 OCI_RECIPE_ALLOW_CREATE,37 OCI_RECIPE_ALLOW_CREATE,
38 OCI_RECIPE_BUILD_DISTRIBUTION,38 OCI_RECIPE_BUILD_DISTRIBUTION,
39 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
40 CannotModifyOCIRecipeProcessor,39 CannotModifyOCIRecipeProcessor,
41 DuplicateOCIRecipeName,40 DuplicateOCIRecipeName,
42 IOCIRecipe,41 IOCIRecipe,
@@ -275,12 +274,7 @@ class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory):
275 def test_requestBuild_triggers_webhooks(self):274 def test_requestBuild_triggers_webhooks(self):
276 # Requesting a build triggers webhooks.275 # Requesting a build triggers webhooks.
277 logger = self.useFixture(FakeLogger())276 logger = self.useFixture(FakeLogger())
278 with FeatureFixture(277 with FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}):
279 {
280 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
281 OCI_RECIPE_ALLOW_CREATE: "on",
282 }
283 ):
284 recipe = self.factory.makeOCIRecipe()278 recipe = self.factory.makeOCIRecipe()
285 das = self.factory.makeDistroArchSeries()279 das = self.factory.makeDistroArchSeries()
286 hook = self.factory.makeWebhook(280 hook = self.factory.makeWebhook(
@@ -404,14 +398,7 @@ class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory):
404 def test_requestBuildsFromJob_triggers_webhooks(self):398 def test_requestBuildsFromJob_triggers_webhooks(self):
405 # requestBuildsFromJob triggers webhooks, and the payload includes a399 # requestBuildsFromJob triggers webhooks, and the payload includes a
406 # link to the build request.400 # link to the build request.
407 self.useFixture(401 self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}))
408 FeatureFixture(
409 {
410 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
411 OCI_RECIPE_ALLOW_CREATE: "on",
412 }
413 )
414 )
415 recipe = removeSecurityProxy(402 recipe = removeSecurityProxy(
416 self.factory.makeOCIRecipe(require_virtualized=False)403 self.factory.makeOCIRecipe(require_virtualized=False)
417 )404 )
@@ -507,12 +494,7 @@ class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory):
507494
508 def test_related_webhooks_deleted(self):495 def test_related_webhooks_deleted(self):
509 owner = self.factory.makePerson()496 owner = self.factory.makePerson()
510 with FeatureFixture(497 with FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}):
511 {
512 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
513 OCI_RECIPE_ALLOW_CREATE: "on",
514 }
515 ):
516 recipe = self.factory.makeOCIRecipe(registrant=owner, owner=owner)498 recipe = self.factory.makeOCIRecipe(registrant=owner, owner=owner)
517 webhook = self.factory.makeWebhook(target=recipe)499 webhook = self.factory.makeWebhook(target=recipe)
518 with person_logged_in(recipe.owner):500 with person_logged_in(recipe.owner):
diff --git a/lib/lp/oci/tests/test_ocirecipebuild.py b/lib/lp/oci/tests/test_ocirecipebuild.py
index da54f9c..be8e24c 100644
--- a/lib/lp/oci/tests/test_ocirecipebuild.py
+++ b/lib/lp/oci/tests/test_ocirecipebuild.py
@@ -28,10 +28,7 @@ from lp.buildmaster.enums import BuildStatus
28from lp.buildmaster.interfaces.buildqueue import IBuildQueue28from lp.buildmaster.interfaces.buildqueue import IBuildQueue
29from lp.buildmaster.interfaces.packagebuild import IPackageBuild29from lp.buildmaster.interfaces.packagebuild import IPackageBuild
30from lp.buildmaster.interfaces.processor import IProcessorSet30from lp.buildmaster.interfaces.processor import IProcessorSet
31from lp.oci.interfaces.ocirecipe import (31from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
32 OCI_RECIPE_ALLOW_CREATE,
33 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
34)
35from lp.oci.interfaces.ocirecipebuild import (32from lp.oci.interfaces.ocirecipebuild import (
36 CannotScheduleRegistryUpload,33 CannotScheduleRegistryUpload,
37 IOCIFileSet,34 IOCIFileSet,
@@ -300,8 +297,7 @@ class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
300 hook = self.factory.makeWebhook(297 hook = self.factory.makeWebhook(
301 target=self.build.recipe, event_types=["oci-recipe:build:0.1"]298 target=self.build.recipe, event_types=["oci-recipe:build:0.1"]
302 )299 )
303 with FeatureFixture({OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on"}):300 self.build.updateStatus(BuildStatus.FULLYBUILT)
304 self.build.updateStatus(BuildStatus.FULLYBUILT)
305 expected_payload = {301 expected_payload = {
306 "recipe_build": Equals(302 "recipe_build": Equals(
307 canonical_url(self.build, force_local_path=True)303 canonical_url(self.build, force_local_path=True)
@@ -343,8 +339,7 @@ class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
343 hook = self.factory.makeWebhook(339 hook = self.factory.makeWebhook(
344 target=self.build.recipe, event_types=["oci-recipe:build:0.1"]340 target=self.build.recipe, event_types=["oci-recipe:build:0.1"]
345 )341 )
346 with FeatureFixture({OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on"}):342 self.build.updateStatus(BuildStatus.BUILDING)
347 self.build.updateStatus(BuildStatus.BUILDING)
348 expected_logs = [343 expected_logs = [
349 (344 (
350 hook,345 hook,
@@ -627,8 +622,7 @@ class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
627 hook = self.factory.makeWebhook(622 hook = self.factory.makeWebhook(
628 target=self.build.recipe, event_types=["oci-recipe:build:0.1"]623 target=self.build.recipe, event_types=["oci-recipe:build:0.1"]
629 )624 )
630 with FeatureFixture({OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on"}):625 self.build.scheduleRegistryUpload()
631 self.build.scheduleRegistryUpload()
632 expected_payload = {626 expected_payload = {
633 "recipe_build": Equals(627 "recipe_build": Equals(
634 canonical_url(self.build, force_local_path=True)628 canonical_url(self.build, force_local_path=True)
diff --git a/lib/lp/oci/tests/test_ocirecipebuildjob.py b/lib/lp/oci/tests/test_ocirecipebuildjob.py
index 9722ae4..a8a1778 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildjob.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildjob.py
@@ -22,10 +22,7 @@ from zope.security.proxy import removeSecurityProxy
2222
23from lp.buildmaster.enums import BuildStatus23from lp.buildmaster.enums import BuildStatus
24from lp.buildmaster.interfaces.processor import IProcessorSet24from lp.buildmaster.interfaces.processor import IProcessorSet
25from lp.oci.interfaces.ocirecipe import (25from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
26 OCI_RECIPE_ALLOW_CREATE,
27 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
28)
29from lp.oci.interfaces.ocirecipebuildjob import (26from lp.oci.interfaces.ocirecipebuildjob import (
30 IOCIRecipeBuildJob,27 IOCIRecipeBuildJob,
31 IOCIRegistryUploadJob,28 IOCIRegistryUploadJob,
@@ -212,14 +209,7 @@ class TestOCIRegistryUploadJob(
212209
213 def setUp(self):210 def setUp(self):
214 super().setUp()211 super().setUp()
215 self.useFixture(212 self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}))
216 FeatureFixture(
217 {
218 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
219 OCI_RECIPE_ALLOW_CREATE: "on",
220 }
221 )
222 )
223 self.setUpStats()213 self.setUpStats()
224214
225 def makeOCIRecipeBuild(self, **kwargs):215 def makeOCIRecipeBuild(self, **kwargs):
@@ -641,7 +631,6 @@ class TestOCIRegistryUploadJobViaCelery(
641 self.useFixture(631 self.useFixture(
642 FeatureFixture(632 FeatureFixture(
643 {633 {
644 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
645 OCI_RECIPE_ALLOW_CREATE: "on",634 OCI_RECIPE_ALLOW_CREATE: "on",
646 "jobs.celery.enabled_classes": "OCIRegistryUploadJob",635 "jobs.celery.enabled_classes": "OCIRegistryUploadJob",
647 }636 }
diff --git a/lib/lp/services/webhooks/tests/test_browser.py b/lib/lp/services/webhooks/tests/test_browser.py
index fa282fc..65ba0c3 100644
--- a/lib/lp/services/webhooks/tests/test_browser.py
+++ b/lib/lp/services/webhooks/tests/test_browser.py
@@ -14,10 +14,7 @@ from lp.charms.interfaces.charmrecipe import (
14 CHARM_RECIPE_ALLOW_CREATE,14 CHARM_RECIPE_ALLOW_CREATE,
15 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,15 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,
16)16)
17from lp.oci.interfaces.ocirecipe import (17from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
18 OCI_RECIPE_ALLOW_CREATE,
19 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
20)
21from lp.services.features.testing import FeatureFixture18from lp.services.features.testing import FeatureFixture
22from lp.services.webapp.interfaces import IPlacelessAuthUtility19from lp.services.webapp.interfaces import IPlacelessAuthUtility
23from lp.services.webapp.publisher import canonical_url20from lp.services.webapp.publisher import canonical_url
@@ -142,14 +139,7 @@ class OCIRecipeTestHelpers:
142 super().setUp()139 super().setUp()
143140
144 def makeTarget(self):141 def makeTarget(self):
145 self.useFixture(142 self.useFixture(FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}))
146 FeatureFixture(
147 {
148 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
149 OCI_RECIPE_ALLOW_CREATE: "on",
150 }
151 )
152 )
153 owner = self.factory.makePerson()143 owner = self.factory.makePerson()
154 return self.factory.makeOCIRecipe(registrant=owner, owner=owner)144 return self.factory.makeOCIRecipe(registrant=owner, owner=owner)
155145
diff --git a/lib/lp/services/webhooks/tests/test_job.py b/lib/lp/services/webhooks/tests/test_job.py
index f7e5e71..d80b634 100644
--- a/lib/lp/services/webhooks/tests/test_job.py
+++ b/lib/lp/services/webhooks/tests/test_job.py
@@ -37,10 +37,7 @@ from lp.charms.interfaces.charmrecipe import (
37 CHARM_RECIPE_ALLOW_CREATE,37 CHARM_RECIPE_ALLOW_CREATE,
38 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,38 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,
39)39)
40from lp.oci.interfaces.ocirecipe import (40from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
41 OCI_RECIPE_ALLOW_CREATE,
42 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
43)
44from lp.services.database.interfaces import IStore41from lp.services.database.interfaces import IStore
45from lp.services.features.testing import FeatureFixture42from lp.services.features.testing import FeatureFixture
46from lp.services.job.interfaces.job import JobStatus43from lp.services.job.interfaces.job import JobStatus
@@ -417,12 +414,7 @@ class TestWebhookDeliveryJob(TestCaseWithFactory):
417 def test_oci_recipe__repr__(self):414 def test_oci_recipe__repr__(self):
418 # `WebhookDeliveryJob` objects for OCI recipes have an informative415 # `WebhookDeliveryJob` objects for OCI recipes have an informative
419 # __repr__.416 # __repr__.
420 with FeatureFixture(417 with FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}):
421 {
422 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
423 OCI_RECIPE_ALLOW_CREATE: "on",
424 }
425 ):
426 recipe = self.factory.makeOCIRecipe()418 recipe = self.factory.makeOCIRecipe()
427 hook = self.factory.makeWebhook(target=recipe)419 hook = self.factory.makeWebhook(target=recipe)
428 job = WebhookDeliveryJob.create(hook, "test", payload={"foo": "bar"})420 job = WebhookDeliveryJob.create(hook, "test", payload={"foo": "bar"})
diff --git a/lib/lp/services/webhooks/tests/test_model.py b/lib/lp/services/webhooks/tests/test_model.py
index cfa0a35..85d2c40 100644
--- a/lib/lp/services/webhooks/tests/test_model.py
+++ b/lib/lp/services/webhooks/tests/test_model.py
@@ -13,10 +13,7 @@ from lp.charms.interfaces.charmrecipe import (
13 CHARM_RECIPE_ALLOW_CREATE,13 CHARM_RECIPE_ALLOW_CREATE,
14 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,14 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,
15)15)
16from lp.oci.interfaces.ocirecipe import (16from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
17 OCI_RECIPE_ALLOW_CREATE,
18 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
19)
20from lp.registry.enums import BranchSharingPolicy17from lp.registry.enums import BranchSharingPolicy
21from lp.services.database.interfaces import IStore18from lp.services.database.interfaces import IStore
22from lp.services.features.testing import FeatureFixture19from lp.services.features.testing import FeatureFixture
@@ -500,12 +497,7 @@ class TestWebhookSetOCIRecipe(TestWebhookSetBase, TestCaseWithFactory):
500 if owner is None:497 if owner is None:
501 owner = self.factory.makePerson()498 owner = self.factory.makePerson()
502499
503 with FeatureFixture(500 with FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}):
504 {
505 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
506 OCI_RECIPE_ALLOW_CREATE: "on",
507 }
508 ):
509 return self.factory.makeOCIRecipe(501 return self.factory.makeOCIRecipe(
510 registrant=owner, owner=owner, **kwargs502 registrant=owner, owner=owner, **kwargs
511 )503 )
diff --git a/lib/lp/services/webhooks/tests/test_webservice.py b/lib/lp/services/webhooks/tests/test_webservice.py
index fed30a0..86d577a 100644
--- a/lib/lp/services/webhooks/tests/test_webservice.py
+++ b/lib/lp/services/webhooks/tests/test_webservice.py
@@ -23,10 +23,7 @@ from lp.charms.interfaces.charmrecipe import (
23 CHARM_RECIPE_ALLOW_CREATE,23 CHARM_RECIPE_ALLOW_CREATE,
24 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,24 CHARM_RECIPE_WEBHOOKS_FEATURE_FLAG,
25)25)
26from lp.oci.interfaces.ocirecipe import (26from lp.oci.interfaces.ocirecipe import OCI_RECIPE_ALLOW_CREATE
27 OCI_RECIPE_ALLOW_CREATE,
28 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG,
29)
30from lp.services.features.testing import FeatureFixture27from lp.services.features.testing import FeatureFixture
31from lp.services.webapp.interfaces import OAuthPermission28from lp.services.webapp.interfaces import OAuthPermission
32from lp.soyuz.interfaces.livefs import (29from lp.soyuz.interfaces.livefs import (
@@ -498,12 +495,7 @@ class TestWebhookTargetOCIRecipe(TestWebhookTargetBase, TestCaseWithFactory):
498495
499 def makeTarget(self):496 def makeTarget(self):
500 owner = self.factory.makePerson()497 owner = self.factory.makePerson()
501 with FeatureFixture(498 with FeatureFixture({OCI_RECIPE_ALLOW_CREATE: "on"}):
502 {
503 OCI_RECIPE_WEBHOOKS_FEATURE_FLAG: "on",
504 OCI_RECIPE_ALLOW_CREATE: "on",
505 }
506 ):
507 return self.factory.makeOCIRecipe(registrant=owner, owner=owner)499 return self.factory.makeOCIRecipe(registrant=owner, owner=owner)
508500
509501

Subscribers

People subscribed via source and target branches

to status/vote changes: