remotelearner / moodle-report_ncccscensus

Customized version of the report_census for NCCCS
0 stars 1 forks source link

Unit test fails using Postgres #2

Open mchurchward opened 8 years ago

mchurchward commented 8 years ago

A unit test that works with MySQL fails under Postgres. MySQL version - https://travis-ci.org/POETGroup/moodle-report_ncccscensus/jobs/164651761#L701 Postgres version - https://travis-ci.org/POETGroup/moodle-report_ncccscensus/jobs/164651760#L701

This may be related to https://github.com/remotelearner/moodle-report_ncccscensus/issues/1 ?

mchurchward commented 8 years ago

This is not related to issue #1. The problem is that the unit test depends on the order of courses returned from 'report_ncccscensus_get_courses'. It is presuming they are returned in order of "id" but the function does not specify an order. I believe the test is written incorrectly and should not depend on the order.

tbannister commented 8 years ago

That's pretty much my conclusion. I found the same problem on Friday, and am fixing it today.

mchurchward commented 8 years ago

Don't worry. I just fixed it. I'll supply the pull request momentarily.

mchurchward commented 8 years ago

This pull fixes this issue = https://github.com/POETGroup/moodle-report_ncccscensus/commit/3d994149be74d4c4688bd27887c477c04dc24f32 It also fixes some coding guideline issues. I have to figure out how to change the basefork of POET's fork now. This pull is off of the MOODLE_31_STABLE branch.