-
Bug
-
Resolution: Fixed
-
Major
-
4.0, 4.1
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_400_STABLE
-
Part of the release process, we apply to disable language upgrades because the new branches, just created, don't have lang packs yet.
Normally, that's done with $CFG->skiplangupgrade = true and that is enough to prevent the "upgrade langs" task to be run by cron (and fail).
But it seems that, in 400 and master, there are some new behat scenarios that require the language upgrades to happen, in order to verify various things in the laguage menus presented to the user.
The failing scenarios are:
- Test login language selector (1 scenario)
- Language selector menu (5 scenarios)
Link: https://ci.moodle.org/job/W400.04.01%20-%20Behat%20-%20Firefox%20+%20Postgres/1/
Surely, those scenarios should be skipped, and, maybe that can be done by:
- defining the TOOL_LANGIMPORT_REMOTE_TESTS constant when $CFG->skiplangupgrade is NOT set (in config.php template of moodle-ci-runner). Borrowed from my local config.php template, I've this:
// Disable lang updates on upgrade
$CFG->skiplangupgrade = true;
if (empty($CFG->skiplangupgrade)) {
// Define it only if we aren't skipping lang upgrade (grrr, hate negatives)
define('TOOL_LANGIMPORT_REMOTE_TESTS', true);
}
- adding the "Given remote langimport tests are enabled" step the very first to the scenarios, that looks exactly for that constant, so they are just skipped when lang upgrades are disabled.
That way the constant will be set normally when the langs are available (and the scenarios will run). And when the langs are not available, the constant won't be set and the scenarios will be skipped.
Ciao