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

Some recent external calendar tests fail for month days 01-09 (regression)

    XMLWordPrintable

    Details

      Description

      With the new year (January 1st) we have detected that MDL-67152 introduced/changed some tests that are failing for days 01-09 every month.

      Link: https://ci.moodle.org/view/B%20-%20master/job/W.01.01%20-%20PHPUnit%20-%20Postgres/922/

      There were 2 errors:
       
      1) core_calendar_externallib_testcase::test_get_calendar_monthly_view_no_course_permission
      invalid_parameter_exception: Invalid parameter value detected (day => Invalid parameter value detected (Invalid external api parameter: the value is "01", the server was expecting "int" type): Invalid external api parameter: the value is "01", the server was expecting "int" type)
       
      /var/www/html/lib/externallib.php:349
      /var/www/html/calendar/externallib.php:1005
      /var/www/html/calendar/tests/externallib_test.php:2375
      /var/www/html/lib/phpunit/classes/advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit --verbose "core_calendar_externallib_testcase" calendar/tests/externallib_test.php
       
      2) core_calendar_externallib_testcase::test_get_calendar_monthly_view_with_day_provided
      invalid_parameter_exception: Invalid parameter value detected (day => Invalid parameter value detected (Invalid external api parameter: the value is "01", the server was expecting "int" type): Invalid external api parameter: the value is "01", the server was expecting "int" type)
       
      /var/www/html/lib/externallib.php:349
      /var/www/html/calendar/externallib.php:1005
      /var/www/html/calendar/tests/externallib_test.php:2407
      /var/www/html/lib/phpunit/classes/advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit --verbose "core_calendar_externallib_testcase" calendar/tests/externallib_test.php
      

      This issue is about to fix them, pure unit test fix, underlying code is correct.

      Apparently both 38_STABLE and master need the fix applied.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Andrew Nicols
              Integrator:
              Jake Dallimore
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 55 minutes
                  55m