Skip to content

Commit

Permalink
Robot tests: install our GS profile.
Browse files Browse the repository at this point in the history
I noticed that on Jenkins only 142 robot tests were run instead of 149.  The console showed the reason:

```
  Set up plone.app.contenttypes.testing.PloneAppContenttypes in 0.020 seconds.
  Set up plone.app.robotframework.testing.SimplePublicationLayer in 0.001 seconds.
  Set up plone.app.robotframework.remote.RemoteLibraryBundle:RobotRemote in 0.000 seconds.
  Set up plone.testing.zope.WSGIServer in 0.043 seconds.
  Set up plone.app.robotframework.testing.RemoteLibrary:Robot in 0.000 seconds.
  Set up plone.app.discussion.testing.PloneAppDiscussionRobot Traceback (most recent call last):
  File "/Users/maurits/shared-eggs/cp311/zope.testrunner-6.4-py3.11.egg/zope/testrunner/runner.py", line 474, in run_layer
    setup_layer(options, layer, setup_layers)
  File "/Users/maurits/shared-eggs/cp311/zope.testrunner-6.4-py3.11.egg/zope/testrunner/runner.py", line 839, in setup_layer
    setup_layer(options, base, setup_layers)
  File "/Users/maurits/shared-eggs/cp311/zope.testrunner-6.4-py3.11.egg/zope/testrunner/runner.py", line 844, in setup_layer
    layer.setUp()
  File "/Users/maurits/shared-eggs/cp311/plone.app.testing-7.1.0-py3.11.egg/plone/app/testing/helpers.py", line 378, in setUp
    self.setUpPloneSite(portal)
  File "/Users/maurits/community/plone-coredev/6.1/src/plone.app.discussion/plone/app/discussion/testing.py", line 111, in setUpPloneSite
    settings = registry.forInterface(IDiscussionSettings)
  File "/Users/maurits/shared-eggs/cp311/plone.registry-2.0.1-py3.11.egg/plone/registry/registry.py", line 71, in forInterface
    raise KeyError(
KeyError: 'Interface `plone.app.discussion.interfaces.IDiscussionSettings` defines a field `globally_enabled`, for which there is no record.'
```
  • Loading branch information
mauritsvanrees committed Aug 13, 2024
1 parent f896cb4 commit 603c903
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plone/app/discussion/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class PloneAppDiscussionRobot(PloneAppDiscussion):
)

def setUpPloneSite(self, portal):
applyProfile(portal, "plone.app.discussion:default")
registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings)
settings.globally_enabled = True
Expand Down

0 comments on commit 603c903

Please sign in to comment.