Created attachment 62367 [details] [review] Bug 18448: Fix a few db_dependent tests Tests in db_dependent may expect a Koha database, but should not rely on hardcoded categories, currencies, branch codes, etc. This patch fixes a bunch of those. But this is a continuous project. We also need QA to closely watch new edits. Accounts.t: hardcoded category PT replaced Acquisition/OrderFromSubscription.t: hardcoded USD Acquisition/StandingOrders.t: same ArticleRequests.t: create itemtype, branch and category for testing AuthorisedValues.t: remove $dbh, add two test branches AuthoritiesMarc.t: add hardcoded GEOGR_NAME authtype Bookseller.t: add test currency Koha.t: add test itemtype instead of hardcoded BK UsageStats.t: add test branch and category Test plan: Run the adjusted tests. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 62368 [details] [review] Bug 18448: Fix a few db_dependent tests Tests in db_dependent may expect a Koha database, but should not rely on hardcoded categories, currencies, branch codes, etc. This patch fixes a bunch of those. But this is a continuous project. We also need QA to closely watch new edits. Accounts.t: hardcoded category PT replaced Acquisition/OrderFromSubscription.t: hardcoded USD Acquisition/StandingOrders.t: same ArticleRequests.t: create itemtype, branch and category for testing AuthorisedValues.t: remove $dbh, add two test branches AuthoritiesMarc.t: add hardcoded GEOGR_NAME authtype Bookseller.t: add test currency Koha.t: add test itemtype instead of hardcoded BK UsageStats.t: add test branch and category Test plan: Run the adjusted tests. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Sorry, I get a merge conflict with t/db_dependent/Koha.t
(In reply to Marc Véron from comment #3) > Sorry, I get a merge conflict with t/db_dependent/Koha.t Dependency? Or could you copy/paste the conflict?
Switched to an other vm with a new install, git pull to make sure to be on the newest master (is: 16.12.00.024), HEAD is 8e5c9ba Bug 17835: (followup) Make TestBuilder skip views, git bz apply 18448, result: Wende an: Bug 18448: Fix a few db_dependent tests Verwende Informationen aus der Staging-Area, um einen Basisverzeichnis nachzustellen M t/db_dependent/Koha.t Falle zurück zum Patchen der Basis und des 3-Wege-Merges... automatischer Merge von t/db_dependent/Koha.t KONFLIKT (Inhalt): Merge-Konflikt in t/db_dependent/Koha.t Merge der Änderungen fehlgeschlagen Anwendung des Patches fehlgeschlagen bei 0001 Bug 18448: Fix a few db_dependent tests
Forgot to mention dependencies: I tried on top of 18420
Created attachment 62392 [details] [review] Bug 18448: Fix a few db_dependent tests Tests in db_dependent may expect a Koha database, but should not rely on hardcoded categories, currencies, branch codes, etc. This patch fixes a bunch of those. But this is a continuous project. We also need QA to closely watch new edits. Accounts.t: hardcoded category PT replaced Acquisition/OrderFromSubscription.t: hardcoded USD Acquisition/StandingOrders.t: same ArticleRequests.t: create itemtype, branch and category for testing AuthorisedValues.t: remove $dbh, add two test branches AuthoritiesMarc.t: add hardcoded GEOGR_NAME authtype Bookseller.t: add test currency Koha.t: add test itemtype instead of hardcoded BK UsageStats.t: add test branch and category Test plan: Run the adjusted tests. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Marc Véron from comment #5) > Switched to an other vm with a new install, git pull to make sure to be on > the newest master (is: 16.12.00.024), HEAD is 8e5c9ba Bug 17835: (followup) > Make TestBuilder skip views, git bz apply 18448, result: > > Wende an: Bug 18448: Fix a few db_dependent tests > Verwende Informationen aus der Staging-Area, um einen Basisverzeichnis > nachzustellen > M t/db_dependent/Koha.t > Falle zurück zum Patchen der Basis und des 3-Wege-Merges... > automatischer Merge von t/db_dependent/Koha.t > KONFLIKT (Inhalt): Merge-Konflikt in t/db_dependent/Koha.t > Merge der Änderungen fehlgeschlagen > Anwendung des Patches fehlgeschlagen bei 0001 Bug 18448: Fix a few > db_dependent tests Should be resolved now. Rebased on top of the itemtype changes.
Testing immediately after minimal install, Marc21, mandatory data only installed prove -v t/db_dependent/Accounts.t OK t/db_dependent/Acquisition/OrderFromSubscription.t OK prove -v t/db_dependent/Acquisition/StandingOrders.t OK prove -v t/db_dependent/ArticleRequests.t OK prove -v t/db_dependent/AuthorisedValues.t OK prove -v t/db_dependent/AuthoritiesMarc.t OK prove -v t/db_dependent/Bookseller.t OK prove -v t/db_dependent/Koha.t OK prove -v t/db_dependent/UsageStats.t OK
Created attachment 62398 [details] [review] Bug 18448: Fix a few db_dependent tests Tests in db_dependent may expect a Koha database, but should not rely on hardcoded categories, currencies, branch codes, etc. This patch fixes a bunch of those. But this is a continuous project. We also need QA to closely watch new edits. Accounts.t: hardcoded category PT replaced Acquisition/OrderFromSubscription.t: hardcoded USD Acquisition/StandingOrders.t: same ArticleRequests.t: create itemtype, branch and category for testing AuthorisedValues.t: remove $dbh, add two test branches AuthoritiesMarc.t: add hardcoded GEOGR_NAME authtype Bookseller.t: add test currency Koha.t: add test itemtype instead of hardcoded BK UsageStats.t: add test branch and category Test plan: Run the adjusted tests. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> All tests successful (see comment #9) Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 62418 [details] [review] Bug 18448: Fix a few db_dependent tests Tests in db_dependent may expect a Koha database, but should not rely on hardcoded categories, currencies, branch codes, etc. This patch fixes a bunch of those. But this is a continuous project. We also need QA to closely watch new edits. Accounts.t: hardcoded category PT replaced Acquisition/OrderFromSubscription.t: hardcoded USD Acquisition/StandingOrders.t: same ArticleRequests.t: create itemtype, branch and category for testing AuthorisedValues.t: remove $dbh, add two test branches AuthoritiesMarc.t: add hardcoded GEOGR_NAME authtype Bookseller.t: add test currency Koha.t: add test itemtype instead of hardcoded BK UsageStats.t: add test branch and category Test plan: Run the adjusted tests. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> All tests successful (see comment #9) Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Thanks Marc and Jonathan!
Pushed to master for 17.05, thanks Marcel!
Blocked by dependency...
Dependency still doesn't apply to 16.11.x. Closing.