]> git.evergreen-ils.org Git - Evergreen.git/commit
tests against stock test data and live Evergreen
authorJason Etheridge <jason@esilibrary.com>
Wed, 17 Jul 2013 21:55:07 +0000 (17:55 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 10 Oct 2013 18:49:29 +0000 (14:49 -0400)
commit310a0d54be9bf141141d0a8647f0af9c8f3120ca
tree22e9f662cc7de80035edf359069651e29accb720
parente917670aee2da991e4a304a6cb9fbf4414372d1b
tests against stock test data and live Evergreen

I'm running these on a machine where Evergreen has been installed with the stock
test data.  Repeat invocations of the tests will cause test failures, as they
don't completely cleanup after themselves (the goal long-term is to rely on
complete database wipes between invocations).

Manual cleanup right now could include doing the following in psql:
DELETE FROM actor.workstation WHERE name ~ '.t$';

and paying the bills on the admin user (otherwise, once a Max Fines penalty is
generated, checkout tests will fail).

opensrf@dev141:~/git/Evergreen/Open-ILS/src/perlmods (livetests)$ make livecheck 2> /dev/null
perl Build.PL --destdir  || make -s build-perl-fail
Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'OpenILS' version '2.4'
./Build test --test_files live_t || make -s build-perl-fail
live_t/00-simple.t ..................... ok
live_t/01-auth.t ....................... ok
live_t/02-simple_circ.t ................ ok
live_t/03-overdue_circ.t ............... ok
live_t/04-overdue_with_closed_dates.t .. ok
All tests successful.
Files=5, Tests=62, 11 wallclock secs ( 0.25 usr  0.16 sys +  3.52 cusr  0.63 csys =  4.56 CPU)
Result: PASS

and

opensrf@dev141:~/git/Evergreen/Open-ILS/src/perlmods (livetests)$ prove -v live_t/
live_t/00-simple.t .....................
1..2
 # Simple tests against the open-ils.storage service and the stock test data.
ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
ok 2 - User with id = 1 is admin user
ok
live_t/01-auth.t .......................
1..4
 # Simple tests against the open-ils.auth service, memcached, and the stock test data.
 # authtime is 7200, authtoken is a3f2d06775fb670284450ad1f1d6ea00
ok 1 - Have an authtoken
ok 2 - Default authtime for staff login is 7200 seconds
ok 3 - Can retrieve authtoken from memcached
ok 4 - Authtoken is removed from memcached after logout
ok
live_t/02-simple_circ.t ................
1..14
 # Test circulation of item CONC70000345 against the admin user.
ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
ok 2 - User with id = 1 is admin user
ok 3 - open-ils.storage.direct.asset.copy.retrieve returned acp object
ok 4 - Item with id = 310 has barcode CONC70000345
ok 5 - Item with id = 310 has status of Reshelving or Available
 # authtime is 7200, authtoken is f7c9ae35165ec74ab5e8ce5b84673da8
ok 6 - Have an authtoken
ok 7 - Registered a new workstation
 # authtime is 7200, authtoken is f7c9ae35165ec74ab5e8ce5b84673da8
ok 8 - Have an authtoken associated with the workstation
ok 9 - Checkout request returned a HASH
ok 10 - Checkout returned a SUCCESS event
ok 11 - Item with id = 310 has status of Checked Out after fresh Storage request
ok 12 - Checkin request returned a HASH
ok 13 - Checkin returned a SUCCESS event
ok 14 - Item with id = 310 has status of Reshelving or Available after fresh Storage request
ok
live_t/03-overdue_circ.t ...............
1..20
 # Test fine generation on checkin against the admin user.
ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
ok 2 - User with id = 1 is admin user
ok 3 - open-ils.storage.direct.asset.copy.retrieve returned acp object
ok 4 - Item with id = 810 has barcode CONC71000345
ok 5 - Item with id = 810 has status of Reshelving or Available
 # authtime is 7200, authtoken is 5ab4ae5b9a09c7fd04b4eb0dabf19da5
ok 6 - Have an authtoken
ok 7 - Registered a new workstation
 # authtime is 7200, authtoken is 5ab4ae5b9a09c7fd04b4eb0dabf19da5
ok 8 - Have an authtoken associated with the workstation
ok 9 - Checkout request returned a HASH
ok 10 - Checkout returned a SUCCESS event
ok 11 - Checkout response object has payload object
ok 12 - Payload object has circ object
ok 13 - Circ objection has loan duration of "7 days"
ok 14 - Item with id = 810 has status of Checked Out after fresh Storage request
ok 15 - Zero bills associated with circulation
ok 16 - rewrote circ to have happened 20 days ago
ok 17 - Checkin request returned a HASH
ok 18 - Checkin returned a SUCCESS event
ok 19 - Item with id = 810 has status of Reshelving or Available after fresh Storage request
ok 20 - Thirteen bills associated with circulation
ok
live_t/04-overdue_with_closed_dates.t ..
1..22
 # Test fine generation with closed date on checkin against the admin user.
ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
ok 2 - User with id = 1 is admin user
ok 3 - open-ils.storage.direct.asset.copy.retrieve returned acp object
ok 4 - Item with id = 1310 has barcode CONC72000345
ok 5 - Item with id = 1310 has status of Reshelving or Available
 # authtime is 7200, authtoken is dd4b533f677dd5ec6d177312eca2e86b
ok 6 - Have an authtoken
ok 7 - Registered a new workstation
 # authtime is 7200, authtoken is dd4b533f677dd5ec6d177312eca2e86b
ok 8 - Have an authtoken associated with the workstation
ok 9 - Created a closed date for 10 days ago
ok 10 - Checkout request returned a HASH
ok 11 - Checkout returned a SUCCESS event
ok 12 - Checkout response object has payload object
ok 13 - Payload object has circ object
ok 14 - Circ objection has loan duration of "7 days"
ok 15 - Item with id = 1310 has status of Checked Out after fresh Storage request
ok 16 - Zero bills associated with circulation
ok 17 - rewrote circ to have happened 20 days ago
ok 18 - Checkin request returned a HASH
ok 19 - Checkin returned a SUCCESS event
ok 20 - Item with id = 1310 has status of Reshelving or Available after fresh Storage request
ok 21 - Twelve bills associated with circulation (instead of 13, thanks to closed date)
ok 22 - Removed closed date
ok
All tests successful.
Files=5, Tests=62, 10 wallclock secs ( 0.06 usr  0.04 sys +  3.29 cusr  0.50 csys =  3.89 CPU)
Result: PASS

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/Makefile.am
Open-ILS/src/perlmods/live_t/00-simple.t [new file with mode: 0644]
Open-ILS/src/perlmods/live_t/01-auth.t [new file with mode: 0644]
Open-ILS/src/perlmods/live_t/02-simple_circ.t [new file with mode: 0644]
Open-ILS/src/perlmods/live_t/03-overdue_circ.t [new file with mode: 0644]
Open-ILS/src/perlmods/live_t/04-overdue_with_closed_dates.t [new file with mode: 0644]