LP#1665626: Change order of test bib loading user/kmlussier/lp1665626-fix-metarecord-test2
authorKathy Lussier <klussier@masslnc.org>
Tue, 21 Feb 2017 16:27:33 +0000 (11:27 -0500)
committerKathy Lussier <klussier@masslnc.org>
Tue, 21 Feb 2017 17:43:04 +0000 (12:43 -0500)
As bshum did for e-book records, let's move MR records down to the end of the
script to avoid breaking tests.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/tests/datasets/sql/bibs_mr.sql
Open-ILS/tests/datasets/sql/load_all.sql

index 04f4895..2d33457 100644 (file)
@@ -1,4 +1,4 @@
-\set bib_tag '''IMPORT MR'''
+\\set bib_tag '''IMPORT MR'''
 
 INSERT INTO marcxml_import (tag, marc) VALUES
 
index 821a7b5..dbb4e36 100644 (file)
@@ -1,4 +1,4 @@
-N;
+BEGIN;
 
 -- stop on error
 \set ON_ERROR_STOP on
@@ -30,12 +30,6 @@ N;
 -- load RDA bibs
 \i bibs_rda.sql
 
--- load EbookAPI bibs
-\i bibs_ebook_api.sql
-
--- load metarecord bibs
-\i bibs_mr.sql
-
 -- insert all loaded bibs into the biblio.record_entry in insert order
 INSERT INTO biblio.record_entry (marc, last_xact_id) 
     SELECT marc, tag FROM marcxml_import ORDER BY id;
@@ -55,9 +49,6 @@ INSERT INTO biblio.record_entry (marc, last_xact_id)
 -- load RDA copies, etc.
 \i assets_rda.sql
 
--- load MR copies, etc.
-\i assets_mr.sql
-
 -- load copy-related data
 \i assets_extras.sql
 
@@ -80,6 +71,12 @@ DELETE FROM marcxml_import;
 -- load EbookAPI bibs
 \i bibs_ebook_api.sql
 
+-- load metarecord bibs
+\i bibs_mr.sql
+
+-- load MR copies, etc.
+\i assets_mr.sql
+
 -- insert all loaded bibs into the biblio.record_entry in insert order
 INSERT INTO biblio.record_entry (marc, last_xact_id)
     SELECT marc, tag FROM marcxml_import ORDER BY id;