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

Unit test failure in master branch undefined function external_generate_token_for_current_user

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 4.0
    • 4.0
    • Libraries
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      Initialise phpunit:

      php admin/tool/phpunit/cli/init.php

      immediately after, run core_notifications_testcase tests and make sure no errors are reported.

      $ vendor/bin/phpunit --testsuite=core_login_testsuite --filter core_login_notifications_testcase

       

      Show
      Initialise phpunit: php admin/tool/phpunit/cli/init.php immediately after, run core_notifications_testcase tests and make sure no errors are reported. $ vendor/bin/phpunit --testsuite=core_login_testsuite --filter core_login_notifications_testcase  

    Description

      We're seeing these in our CI for Moodle 4.0

      1) core_login_notifications_testcase::test_mobile_app_login_notificationError: Call to undefined function external_generate_token_for_current_user()
      /var/www/html/login/tests/notifications_test.php:158/var/www/html/lib/phpunit/classes/advanced_testcase.php:80
      2) core_login_notifications_testcase::test_mobile_app_login_notification_skip_same_ipError: Call to undefined function external_generate_token_for_current_user()
      /var/www/html/login/tests/notifications_test.php:207/var/www/html/lib/phpunit/classes/advanced_testcase.php:80
      3) core_login_notifications_testcase::test_mobile_app_login_notification_skip_same_deviceError: Call to undefined function external_generate_token_for_current_user()
      /var/www/html/login/tests/notifications_test.php:254/var/www/html/lib/phpunit/classes/advanced_testcase.php:80
      ERRORS!

      I suspect it's reproduceable by doing an init call and then running the test immediately after - probably similar to WP-2774 (we run our tests in suites here)

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              danmarsden Dan Marsden
              Paul Holden Paul Holden
              Victor Déniz Falcón Victor Déniz Falcón
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 45 minutes
                  45m

                  Clockify

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