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

Consider moving h5p tests accessing h5p.org to exttests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8, 3.9
    • Fix Version/s: 3.8.2
    • Component/s: H5P, Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      Set up the environment

      1. Download the attached files to your local web server.
      2. Update your config.php to point the tests to wherever you've hosted the attached files, for example: 
        define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://exttests');

      Run unit tests

      1. Run H5P tests:
        • \h5p_get_content_types_task_test (lib/tests/h5p_get_content_types_task_test.php)
        • \core_h5p\h5p_core_test (h5p/tests/h5p_core_test.php)
      2. Confirm lack of failure
      Show
      Set up the environment Download the attached files to your local web server. If they have been added to https://github.com/moodlehq/moodle-exttests , you can clone the repo to your local web server or run it as a Docker image. Update your config.php to point the tests to wherever you've hosted the attached files, for example:  define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://exttests'); Run unit tests Run H5P tests: \h5p_get_content_types_task_test (lib/tests/h5p_get_content_types_task_test.php) \core_h5p\h5p_core_test (h5p/tests/h5p_core_test.php) Confirm  lack of failure
    • Affected Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull from Repository:
    • Pull 3.8 Branch:
    • Pull Master Branch:
      MDL-67296-master

      Description

      It seems that a number (undetermined at the time of write this) of unit-tests (maybe also behat tests) are accessing to external systems, like h5p.org to fetch various information.

      That may cause (uncontrolled by us) problems when the external systems are unreachable, slow... so, instead we should consider performing all those tests against our https://github.com/moodlehq/moodle-exttests exttests repository, that can be installed locally, and provides constant/fixed content.

      So this issue is about to detect were in h5p we are using external (3rd part) systems and add standard support to exttests (see TEST_EXTERNAL_FILES_HTTPS_URL...) for them.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vmdef Víctor Déniz Falcón
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Amaia Anabitarte
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Mar/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 5 hours, 15 minutes
                  3d 5h 15m