http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7593 --- Comment #56 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #55) Chris, Thank you for your quick reply!
The tests fail, because they are dependent on orders existing for an existing supplier, but the test does not set up any of this up, so they work coincidentally on systems that have it set up, skip on others that have no orders, fail on others that have some orders but not the ones the test is expecting.
So what was the case for the DB used by jenkins? Was an order exist ? I think yes: Yesterday, the jenkins report for t/db_dependent/Acquisition.t was [...] ok 2 - NewBasket( 1 , 1 ) returns 18575 ok 3 - GetBasket(18575) returns HASH(0x3b1a960) ok 4 - The reference isa ARRAY ok 5 - GetOrdersByBiblionumber : no argument, return undef not ok 6 - GetOrdersByBiblionumber : result is defined not ok 7 - GetOrdersByBiblionumber : result contains at least one element ok 8 - all orders match ok 9 - AddClaim : Check claimed_date ok 10 - This order has a basketno field ok 11 - This order has a biblioitemnumber field ok 12 - This order has a biblionumber field ok 13 - This order has a invoiceid field [...] If no orders existed we should have: ok 1 - use C4::Acquisition; ok 2 - NewBasket( 1 , 1 ) returns 92 ok 3 - GetBasket(92) returns HASH(0x402ecc8) ok 4 - The reference isa ARRAY ok 5 - GetOrdersByBiblionumber : no argument, return undef ok 6 # skip No Orders, cannot test GetOrdersByBiblionumber ok 7 # skip No Orders, cannot test GetOrdersByBiblionumber ok 8 # skip No Orders, cannot test GetOrdersByBiblionumber ok 9 - AddClaim : Check claimed_date ok 10 # skip No relevant orders in database, cannot test baskets ok 11 # skip No relevant orders in database, cannot test baskets ok 12 # skip No relevant orders in database, cannot test baskets So yesterday an order existed before tests was launched, but I don't find why. It was not inserted by sample data (which I know) or unit test itself. I would like to unravel this mystery :)
I will make jenkins have data to make these tests pass, in future it would be good to make the tests test creating and deleting orders too, so that they can pass on any database.
Yes, it is what I do and I think Mathieu should propose another patch to go in that way. Otherwise, it will be even more complicated to understand how tests are launched and how launching them with a local DB. -- You are receiving this mail because: You are watching all bug changes.