[open-ils-commits] [GIT] Evergreen ILS branch master updated. b8422397ff57cb4f2709db75451db8a97eb19575

Evergreen Git git at git.evergreen-ils.org
Wed Jul 29 11:53:29 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  b8422397ff57cb4f2709db75451db8a97eb19575 (commit)
       via  3a6c040669fb4d35a1cbffef105acf152d1fb7dd (commit)
      from  437550e7b8343dd4c23c241f83488455be745724 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b8422397ff57cb4f2709db75451db8a97eb19575
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Jul 29 11:30:51 2015 -0400

    LP 1198465: Load negative balance test transactions in load_all.sql
    
    This commit integrates the SQL needed to setup negative balance
    testing into the load_all.sql which loads the rest of the test data.
    
    It also separates out the "reset" commands into a separate SQL file.
    They are useful when doing repeated testing, but unnecessary and
    may eventually require manual tweaking, so they are provided here as a
    convenience only.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>

diff --git a/Open-ILS/tests/datasets/sql/load_all.sql b/Open-ILS/tests/datasets/sql/load_all.sql
index c9f2da4..2694af9 100644
--- a/Open-ILS/tests/datasets/sql/load_all.sql
+++ b/Open-ILS/tests/datasets/sql/load_all.sql
@@ -60,6 +60,7 @@ INSERT INTO biblio.record_entry (marc, last_xact_id)
 
 -- circs, etc.
 \i transactions.sql
+\i neg_bal_custom_transactions.sql
 
 -- clean up the env
 \i env_destroy.sql
diff --git a/Open-ILS/tests/datasets/sql/neg_bal_custom_transactions.sql b/Open-ILS/tests/datasets/sql/neg_bal_custom_transactions.sql
index 23588d1..c6a2083 100644
--- a/Open-ILS/tests/datasets/sql/neg_bal_custom_transactions.sql
+++ b/Open-ILS/tests/datasets/sql/neg_bal_custom_transactions.sql
@@ -1,5 +1,3 @@
-BEGIN;
-
 -- DATA FOR LIVE TESTING LP#1198465:
 --   Support for Conditional Negative Balances
 --
@@ -9,19 +7,6 @@ BEGIN;
 -- NOTE: Org unit settings will be handled in the perl code
 
 
--- clear bills and payments for our test circs
-DELETE FROM money.billing WHERE xact <= 16;
-DELETE FROM money.payment WHERE xact <= 16;
-
--- clear any non-stock settings
--- XXX This will need adjusting if new stock settings are added, so
--- TODO: Pad out org_unit_settings with a SETVAL like we do for other
--- settings
-DELETE FROM actor.org_unit_setting WHERE id >= 14;
-
--- clear out the test workstation (just in case)
-DELETE FROM actor.workstation WHERE name = 'BR1-test-09-lp1198465_neg_balances.t';
-
 -- Setup some LOST circs, and change copy status to LOST
 UPDATE action.circulation SET
     xact_start = '2014-05-14 08:39:13.070326-04',
@@ -191,4 +176,3 @@ UPDATE money.materialized_billable_xact_summary SET balance_owed = 40.00
     WHERE id = 10;
 UPDATE money.materialized_billable_xact_summary SET balance_owed = 0.70
     WHERE id = 11;
-COMMIT;
diff --git a/Open-ILS/tests/datasets/sql/neg_bal_testing_reset.sql b/Open-ILS/tests/datasets/sql/neg_bal_testing_reset.sql
new file mode 100644
index 0000000..94149e0
--- /dev/null
+++ b/Open-ILS/tests/datasets/sql/neg_bal_testing_reset.sql
@@ -0,0 +1,22 @@
+BEGIN;
+
+-- RESET DATA FOR LIVE TESTING LP#1198465:
+--   Support for Conditional Negative Balances
+--
+--   After running this, reload neg_bal_custom_transactions.sql.
+--   Once both files are run, the tests should succeed again.
+
+-- clear bills and payments for our test circs
+DELETE FROM money.billing WHERE xact <= 16;
+DELETE FROM money.payment WHERE xact <= 16;
+
+-- clear any non-stock settings
+-- XXX This will need adjusting if new stock settings are added, so
+-- TODO: Pad out org_unit_settings with a SETVAL like we do for other
+-- settings
+DELETE FROM actor.org_unit_setting WHERE id >= 14;
+
+-- clear out the test workstation (just in case)
+DELETE FROM actor.workstation WHERE name = 'BR1-test-09-lp1198465_neg_balances.t';
+
+COMMIT;

commit 3a6c040669fb4d35a1cbffef105acf152d1fb7dd
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Jul 29 11:04:24 2015 -0400

    LP 1198465: Move negative balance test xacts into sample data
    
    It makes more sense for this to live with the other sample data, so
    let's put it there.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>

diff --git a/Open-ILS/src/sql/Pg/live_t/lp1198465_run_this_before_livetests.sql b/Open-ILS/tests/datasets/sql/neg_bal_custom_transactions.sql
similarity index 100%
rename from Open-ILS/src/sql/Pg/live_t/lp1198465_run_this_before_livetests.sql
rename to Open-ILS/tests/datasets/sql/neg_bal_custom_transactions.sql

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/tests/datasets/sql/load_all.sql           |    1 +
 .../datasets/sql/neg_bal_custom_transactions.sql}  |   16 --------------
 .../tests/datasets/sql/neg_bal_testing_reset.sql   |   22 ++++++++++++++++++++
 3 files changed, 23 insertions(+), 16 deletions(-)
 rename Open-ILS/{src/sql/Pg/live_t/lp1198465_run_this_before_livetests.sql => tests/datasets/sql/neg_bal_custom_transactions.sql} (96%)
 create mode 100644 Open-ILS/tests/datasets/sql/neg_bal_testing_reset.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list