Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-43066

Dataroot reset when trying to install the behat test site being already installed

XMLWordPrintable

    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MDL-43066_master
    • Hide
      1. Install and enable your behat test site: php admin/tool/behat/cli/init.php
      2. Enable your behat test site: php admin/tool/behat/cli/util.php --enable
      3. You SHOULD see the message Acceptance tests environment enabled, to run the tests use:.....
      4. Install your behat test site again using util.php: php admin/tool/behat/cli/util.php --install
      5. You SHOULD see The Behat site is already installed
      6. Enable your behat test site: php admin/tool/behat/cli/util.php --enable
      7. You SHOULD see the message Acceptance tests environment enabled, to run the tests use:.....
      8. Begin a behat run and ensure it starts passing steps properly
      Show
      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 SHOULD see the message Acceptance tests environment enabled, to run the tests use:..... Install your behat test site again using util.php: php admin/tool/behat/cli/util.php --install You SHOULD see The Behat site is already installed Enable your behat test site: php admin/tool/behat/cli/util.php --enable You SHOULD see the message Acceptance tests environment enabled, to run the tests use:..... Begin a behat run and ensure it starts passing steps properly

      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:

      1. Install and enable your behat test site: php admin/tool/behat/cli/init.php
      2. Enable your behat test site: php admin/tool/behat/cli/util.php --enable
      3. 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
      4. 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
      5. 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.
      6. Try to enable the test environment again
      7. You will see an unknown error Unknown error 1 This is not a behat test site!
      8. Try to run the tests
      9. 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.

            dmonllao David Monllaó
            dmonllao David Monllaó
            Petr Skoda Petr Skoda
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.