Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moodle 4.0 changes to display_size trigger unit test failures in tool_objectfs #436

Closed
danmarsden opened this issue Oct 5, 2021 · 1 comment

Comments

@danmarsden
Copy link
Member

MDL-72643 landed this week which tidies up Moodle's display_size function, but objectfs expects the "old" format and so reports failures:

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Implement reporting #2 (0, 100, 'size', 0, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    0 bytes
    '
    +'
    0 bytes
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Implement CRUD #3 (0, 100, 'runningsize', 0, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    0% (0 bytes)
    '
    +'
    0% (0 bytes)
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Implement configuration #5 (0, 100, 'size', 2, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    0 bytes
    '
    +'
    0 bytes
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Implement cron task to delete data already in s3 #6 (0, 100, 'runningsize', 2, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    0.00% (0 bytes)
    '
    +'
    0.00% (0 bytes)
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Add file access log #8 (10, 100, 'size', 2, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    10 bytes
    '
    +'
    10 bytes
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Update config page #9 (10, 100, 'runningsize', 2, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    10.00% (10 bytes)
    '
    +'
    10.00% (10 bytes)
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Add setting to ignore backup files or manage them in a separate bucket #11 (12345678, 123456789, 'size', 0, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    11.8MB
    '
    +'
    11.8 MB
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_add_barchart_method with data set Calculate report in cron task #12 (12345678, 123456789, 'runningsize', 2, '<div class="ofs-bar" style="w...')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'
    10.00% (11.8MB)
    '
    +'
    10.00% (11.8 MB)
    '

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:208
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_get_size_range_from_logsize with data set Implement cron task to push data to s3 #1 ('10', '1KB - 2KB')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'1KB - 2KB'
    +'1.0 KB - 2.0 KB'

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:239
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_get_size_range_from_logsize with data set Implement reporting #2 ('11', '2KB - 4KB')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'2KB - 4KB'
    +'2.0 KB - 4.0 KB'

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:239
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_get_size_range_from_logsize with data set Implement CRUD #3 ('20', '1MB - 2MB')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'1MB - 2MB'
    +'1.0 MB - 2.0 MB'

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:239
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_get_size_range_from_logsize with data set Implement metrics #4 ('21', '2MB - 4MB')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'2MB - 4MB'
    +'2.0 MB - 4.0 MB'

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:239
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_get_size_range_from_logsize with data set Implement configuration #5 ('30', '1GB - 2GB')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'1GB - 2GB'
    +'1.0 GB - 2.0 GB'

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:239
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

  1. tool_objectfs\tests\object_status_testcase::test_object_status_get_size_range_from_logsize with data set Implement cron task to delete data already in s3 #6 ('31', '2GB - 4GB')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'2GB - 4GB'
    +'2.0 GB - 4.0 GB'

/var/www/html/admin/tool/objectfs/tests/object_status_test.php:239
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

@TomoTsuyuki
Copy link
Contributor

It's fixed in #466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants