Summary: | Bug 12995 causes test case failures | ||
---|---|---|---|
Product: | Koha | Reporter: | Robin Sheat <robin> |
Component: | Command-line Utilities | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12995 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12995 | ||
Bug Blocks: | |||
Attachments: |
Bug 13230: t/Biblio.t should run without a DB
Bug 13230: t/Biblio.t should run without a DB Bug 13230: t/Biblio.t should run without a DB [PASSED QA] Bug 13230: t/Biblio.t should run without a DB |
Description
Robin Sheat
2014-11-11 02:44:40 UTC
Created attachment 33446 [details] [review] Bug 13230: t/Biblio.t should run without a DB This patch makes t/Biblio.t mock the DB connexion setting a void one. All tests in this file currently call the C4::Biblio functions with invalid (absent) parameters, so they are expected to raise warnings and return undef values. If someone writes mocked tests for the rest of the functionality, it is expected to mock the DB calls to match the desired scenario. To test: - Turn of MySQL - Run $ prove t/Biblio.t => FAIL: Tests fail because of missing MySQL server - Apply the patch - Run $ prove t/Biblio.t => SUCCESS: Tests now pass - Start MySQL - Run $ prove t/Biblio.t => SUCCESS: Tests still pass - Sign off Regards Tomas Sponsored-by: The will to procrastinate Created attachment 33448 [details] [review] Bug 13230: t/Biblio.t should run without a DB This patch makes t/Biblio.t mock the DB connexion setting a void one. All tests in this file currently call the C4::Biblio functions with invalid (absent) parameters, so they are expected to raise warnings and return undef values. If someone writes mocked tests for the rest of the functionality, it is expected to mock the DB calls to match the desired scenario. To test: - Turn of MySQL - Run $ prove t/Biblio.t => FAIL: Tests fail because of missing MySQL server - Apply the patch - Run $ prove t/Biblio.t => SUCCESS: Tests now pass - Start MySQL - Run $ prove t/Biblio.t => SUCCESS: Tests still pass - Sign off Regards Tomas Sponsored-by: The will to procrastinate Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Sponsored-by: Wanting the darn packages to build Created attachment 33449 [details] [review] Bug 13230: t/Biblio.t should run without a DB This patch makes t/Biblio.t mock the DB connexion setting a void one. All tests in this file currently call the C4::Biblio functions with invalid (absent) parameters, so they are expected to raise warnings and return undef values. If someone writes mocked tests for the rest of the functionality, it is expected to mock the DB calls to match the desired scenario. To test: - Turn of MySQL - Run $ prove t/Biblio.t => FAIL: Tests fail because of missing MySQL server - Apply the patch - Run $ prove t/Biblio.t => SUCCESS: Tests now pass - Start MySQL - Run $ prove t/Biblio.t => SUCCESS: Tests still pass - Sign off Regards Tomas Sponsored-by: The will to procrastinate Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Sponsored-by: Wanting the darn packages to build Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 33450 [details] [review] [PASSED QA] Bug 13230: t/Biblio.t should run without a DB This patch makes t/Biblio.t mock the DB connexion setting a void one. All tests in this file currently call the C4::Biblio functions with invalid (absent) parameters, so they are expected to raise warnings and return undef values. If someone writes mocked tests for the rest of the functionality, it is expected to mock the DB calls to match the desired scenario. To test: - Turn of MySQL - Run $ prove t/Biblio.t => FAIL: Tests fail because of missing MySQL server - Apply the patch - Run $ prove t/Biblio.t => SUCCESS: Tests now pass - Start MySQL - Run $ prove t/Biblio.t => SUCCESS: Tests still pass - Sign off Regards Tomas Sponsored-by: The will to procrastinate Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Sponsored-by: Wanting the darn packages to build Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Sponsored-by: Not wanting to read in my maths book Patch pushed to master. |