- πͺπΈSpain fjgarlin
Just getting this in π Problem with timezone handling (caused by date_get_timezone_db returning only UTC) Needs work . Not sure why this happens.
- @fjgarlin opened merge request.
- πΊπΈUnited States DamienMcKenna NH, USA
This should work as the permission comes from date_tools, which is enabled in the modules list.
- πͺπΈSpain fjgarlin
I know, but somehow it won't get recognized as valid permission. We can see in the output that the module is enabled, but right after the permission is not recognized.
setUp fail: [Other] Line 29 of sites/all/modules/date/tests/DateFieldTestBase.test: Enabled modules: date_all_day, date_all_day_test_feature, field, field_ui, date_api, date, date_tools fail: [Role] Line 43 of sites/all/modules/date/tests/DateFieldTestBase.test: Invalid permission administer date tools.
- πΊπΈUnited States DamienMcKenna NH, USA
The first error means it's failing to install all of the submodules. Do you have Features downloaded locally?
- πͺπΈSpain fjgarlin
The last commit proves that all the submodules are NOT enabled during the test. I haven't even tested things locally yet. Just ran into this issue on another issue and started to test things since @steinmb said tests were passing locally.
- πͺπΈSpain fjgarlin
So, it seems due to "features" not being available in the filesystem, but it is required in the "date.info" file:
test_dependencies[] = features:features (2.x)
Investigating how to fix this now.
- πΊπΈUnited States DamienMcKenna NH, USA
I wonder if we should list features as a dependency in the test getInfo() functions?
- πΊπΈUnited States DamienMcKenna NH, USA
Lets use this issue to add the dependencies on all getInfo() functions.
- Status changed to Needs review
almost 2 years ago 2:49pm 1 February 2023 - πͺπΈSpain fjgarlin
The issue was that the test dependencies weren't explicitly defined and then these weren't enabled during the test, so errors were bubbling up after that.
The MR should fix the issue.
- Status changed to Needs work
almost 2 years ago 2:59pm 1 February 2023 - πΊπΈUnited States DamienMcKenna NH, USA
That's a good start, thank you.
I think any test that extends DateFieldTestBase needs to include "features" in its dependencies list, then others added as needed.
- πͺπΈSpain fjgarlin
Do you reckon we should add these even if they are (still) not needed? Tests are green with the current additions. Happy to spread it to other tests but wanted to ask first.
- πΊπΈUnited States DamienMcKenna NH, USA
I think it's worth doing for completeness sake, in the UI it then won't let you run the sub tests.
Could also refactor it so that getInfo() is defined in DateFieldTestBase with the main dependencies and then the name and description are overridden in the sub classes.
- Assigned to DamienMcKenna
- Status changed to Needs review
almost 2 years ago 5:33pm 1 February 2023 - πΊπΈUnited States DamienMcKenna NH, USA
All getInfo() methods now have a dependencies list.
-
DamienMcKenna β
committed 3190e2e9 on 7.x-2.x authored by
fjgarlin β
Issue #3251102 by fjgarlin, DamienMcKenna, steinmb: DateFieldTestBase::...
-
DamienMcKenna β
committed 3190e2e9 on 7.x-2.x authored by
fjgarlin β
-
DamienMcKenna β
committed e7e62189 on 7.x-3.x authored by
fjgarlin β
Issue #3251102 by fjgarlin, DamienMcKenna, steinmb: DateFieldTestBase::...
-
DamienMcKenna β
committed e7e62189 on 7.x-3.x authored by
fjgarlin β
- Status changed to Fixed
almost 2 years ago 5:43pm 1 February 2023 - πΊπΈUnited States DamienMcKenna NH, USA
Committed. Thanks everyone!
- Issue was unassigned.
Automatically closed - issue fixed for 2 weeks with no activity.