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

MoodleNet PHPUnit failures under Windows

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE
    • Hide
      1. Verify that all the GHA complete runs in this issue are passing (both those near the patch branches and also the four ones linked in a comment of the issue).
      2. Using Windows:
        1. Init phpunit: (php admin/tool/phpunit/cli/init.php).
        2. Run all the core\moodlenet tests: (vendor/bin/phpunit --filter 'core\\moodlenet' --testdox).
        3. Verify that the 10 tests are passing perfectly and they correspond to 3 different core\moodlenet classes.
      Show
      Verify that all the GHA complete runs in this issue are passing (both those near the patch branches and also the four ones linked in a comment of the issue). Using Windows: Init phpunit: ( php admin/tool/phpunit/cli/init.php ). Run all the core\moodlenet tests: ( vendor/bin/phpunit --filter 'core\\moodlenet' --testdox ). Verify that the 10 tests are passing perfectly and they correspond to 3 different core\moodlenet classes.
    • 2
    • Team Hedgehog 2023 Sprint 2.0

      This seems to come from MDL-75316 that was merged upstream last week.

      The very first runs of PHPUnit tests under Windows for the brand new MOODLE_402_STABLE (and master) are failing a few tests:

      There were 4 errors:
       
      1) core\moodlenet\activity_sender_test::test_share_activity with data set "Success" (GuzzleHttp\Psr7\Response Object (...), array(201, 'https://moodlenet.example.com..._1.mbz'))
      rmdir(D:\a\moodle\phpunitdata/trashdir/23/74): Directory not empty
       
      D:\a\moodle\moodle\lib\moodlelib.php:10077
      D:\a\moodle\moodle\lib\moodlelib.php:10066
      D:\a\moodle\moodle\lib\moodlelib.php:10066
      D:\a\moodle\moodle\lib\testing\classes\util.php:792
      D:\a\moodle\moodle\lib\phpunit\classes\util.php:271
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:512
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:128
       
      2) core\moodlenet\activity_sender_test::test_share_activity with data set "Fail with 200 status code" (GuzzleHttp\Psr7\Response Object (...), array(200, 'https://moodlenet.example.com..._2.mbz'))
      fopen(D:\a\moodle\phpunitdata\temp/.htaccess): Failed to open stream: No such file or directory
       
      D:\a\moodle\moodle\lib\setuplib.php:1608
      D:\a\moodle\moodle\lib\setuplib.php:1733
      D:\a\moodle\moodle\backup\util\factories\backup_factory.class.php:63
      D:\a\moodle\moodle\backup\controller\backup_controller.class.php:189
      D:\a\moodle\moodle\lib\classes\moodlenet\activity_packager.php:58
      D:\a\moodle\moodle\lib\classes\moodlenet\activity_sender.php:160
      D:\a\moodle\moodle\lib\classes\moodlenet\activity_sender.php:108
      D:\a\moodle\moodle\lib\tests\moodlenet\activity_sender_test.php:233
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:94
       
      3) core\moodlenet\activity_sender_test::test_share_activity with data set "Fail with 401 status code" (GuzzleHttp\Psr7\Response Object (...), array(401, '', 'Client error: `POST https://m...sponse'))
      rmdir(D:\a\moodle\phpunitdata/filedir/73/42): Directory not empty
       
      D:\a\moodle\moodle\lib\moodlelib.php:10077
      D:\a\moodle\moodle\lib\moodlelib.php:10066
      D:\a\moodle\moodle\lib\testing\classes\util.php:807
      D:\a\moodle\moodle\lib\phpunit\classes\util.php:271
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:512
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:128
       
      4) core\moodlenet\activity_sender_test::test_share_activity with data set "Fail with 404 status code" (GuzzleHttp\Psr7\Response Object (...), array(404, '', 'Client error: `POST https://m...sponse'))
      fopen(D:\a\moodle\phpunitdata\temp/.htaccess): Failed to open stream: No such file or directory
       
      D:\a\moodle\moodle\lib\setuplib.php:1608
      D:\a\moodle\moodle\lib\setuplib.php:1733
      D:\a\moodle\moodle\backup\util\factories\backup_factory.class.php:63
      D:\a\moodle\moodle\backup\controller\backup_controller.class.php:189
      D:\a\moodle\moodle\lib\classes\moodlenet\activity_packager.php:58
      D:\a\moodle\moodle\lib\classes\moodlenet\activity_sender.php:160
      D:\a\moodle\moodle\lib\classes\moodlenet\activity_sender.php:108
      D:\a\moodle\moodle\lib\tests\moodlenet\activity_sender_test.php:233
      D:\a\moodle\moodle\lib\phpunit\classes\advanced_testcase.php:94
      

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Jake Dallimore Jake Dallimore
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 21 minutes
                1d 2h 21m

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