-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.5.3, 2.6
-
Component/s: Automated functional tests (behat)
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_25_STABLE, MOODLE_26_STABLE
-
Fixed Branches:MOODLE_25_STABLE, MOODLE_26_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-43066_master -
Pull Master Diff URL:
I finally reproduced the famous unknown error issue I've been hearing about and nobody knew where it came from.
Steps to reproduce the problem:
- Install and enable your behat test site: php admin/tool/behat/cli/init.php
- Enable your behat test site: php admin/tool/behat/cli/util.php --enable
- You see the message; ok, this is enabled, with the command to copy & paste, this is ok, is useful when you add new steps for example
- Install your behat test site again using util.php: php admin/tool/behat/cli/util.php --install nobody should do it as it does not make sense, but who know, I've just done it by mistake
- It will say that the tables are already present and we can not install the site BUT it before that it already reset the dataroot dir.
- Try to enable the test environment again
- You will see an unknown error Unknown error 1 This is not a behat test site!
- Try to run the tests
- You will see Your behat test site is outdated, please run php admin/tool/behat/cli/init.php from your moodle dirroot to drop and install the behat test site again.
The only solution to all this is to --drop and --install again.
We should check that the site is not installed before resetting the dataroot dir.