Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tests on master are broken #434

Closed
ale-rt opened this issue Oct 8, 2024 · 1 comment · Fixed by #435
Closed

The tests on master are broken #434

ale-rt opened this issue Oct 8, 2024 · 1 comment · Fixed by #435

Comments

@ale-rt
Copy link
Member

ale-rt commented Oct 8, 2024

The test that breaks on GHA is:

Failure in test test_validator_translation (collective.easyform.tests.testValidators.TestBaseValidators.test_validator_translation)
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/unittest/case.py", line 57, in testPartExecutor
    yield
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/unittest/case.py", line 623, in run
    self._callTestMethod(testMethod)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/unittest/case.py", line 579, in _callTestMethod
    if method() is not None:
  File "/home/runner/work/collective.easyform/collective.easyform/src/collective/easyform/tests/testValidators.py", line 177, in test_validator_translation
    self.assertEqual(errors[0].createMessage(), expected_error_message)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/unittest/case.py", line 873, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/unittest/case.py", line 1253, in assertMultiLineEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/unittest/case.py", line 703, in fail
    raise self.failureException(msg)
AssertionError: "Validation failed(isInternationalPhoneNumber):[54 chars]ber." != "Validierung fehlgeschlagen (isInternationalPho[68 chars]mmer"
- Validation failed(isInternationalPhoneNumber): 'testcomments' is not a valid international phone number.
+ Validierung fehlgeschlagen (isInternationalPhoneNumber): 'testcomments' Ist keine gültige internationale Telefonnummer

Locally the test works.

Apparently it is related to something that changed between Plone 6.0.12 and 6.0.13 because this patch:

diff --git a/tests-6.0.x.cfg b/tests-6.0.x.cfg
index 3d9a627..0c0a902 100644
--- a/tests-6.0.x.cfg
+++ b/tests-6.0.x.cfg
@@ -2,3 +2,4 @@
 extends =
     https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg
     base.cfg
+    https://dist.plone.org/release/6.0.12/versions.cfg

fixes the GHA.

@ale-rt
Copy link
Member Author

ale-rt commented Oct 8, 2024

In Plone 6.0.13 some translations were moved to Products.validation.
In order to load them, the zcml that loads the translation catalog should be loaded.

#435 does that and fixes this issue.

@ale-rt ale-rt mentioned this issue Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant