d85f757ce7
For historical reasons the SIPServer and SIP modules have used an extra module path in addition to the standard Koha one. This has caused numerous irritants in attempting to set up scripts and basic tests. It does not help in attempting to modify or debug this code This patch changes the package value in the modules under the C4/SIP directory and makes calls to them use the full package name. Where the export mechanism was being short circuited routines have been explicitly exported and imported declarations of 'use ILS' when that module was not being used and which only generated warnings have been removed. As a lot of the changes affect lines where an object is instantiated with new. The opportunity has been taken to replace the ambiguous indirect syntax with the preferred direct call In intializing ILS the full path is added as this will not require any changes to existing configs. I suspect this feature is unused, and adds obfuscation rather than flexibility but have kept the feature as we need this change in order to rationalize and extend the testing of the server. The visible difference is that with the normal Koha PERL5LIB setting. Compilation of Modules under C4/SIP should be successful and not fail with unlocated modules, allowing developers to see any perl warnings All the SIP modules can now be run through the tests in t/00-load.t now except for SIPServer itself Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
||
---|---|---|
.. | ||
000_sc_config_auth.t | ||
00sc_status.t | ||
01patron_status.t | ||
02patron_info.t | ||
03checkout.t | ||
04patron_status.t | ||
05block_patron.t | ||
06patron_enable.t | ||
07hold.t | ||
08checkin.t | ||
09renew.t | ||
10renew_all.t | ||
11item_info.t | ||
Makefile | ||
README | ||
SIPtest.pm |
CONFIGURING THE TEST SUITE Before you can run the test suite, you need to configure certain information about the SIP server and the ILS data in the file SIPtest.pm. RUNNING THE TESTS Every file tests a different protocol transaction. Unfortunately, a lot of test cases are missing, but the basics are tested, as are most of the simple error conditions (invalid users, unknown items, checking in item that's not checked out). To run a single test, just run perl -I.. <file> If the test fails, the output should be pretty clear about what went wrong (assuming you can read raw SIP packets). To run all the tests, just type make test Right now, that will run tests for functionality that isn't supported in the Evergreen environment (the two main cases are enable patron and hold management). To run just the Evergreen tests, use make test-openils which will run just the tests 00sc_status.t 01patron_status.t 02patron_info.t 03checkout.t 06patron_enable.t 08checkin.t 09renew.t 11item_info.t 05block_patron.t NOTE: the Block Patron tests are run last because "Patron Enable" isn't supported. Thus, after running the "Block Patron" test, manual intervention is required to unblock the test patron. The Renew All tests will fail when running the stub "ILS" implementation unless there's only one ILS server running. This won't be a problem for any real backend implementation that properly manages the database of users and items.