eg 2013 lightning talk
authorBill Erickson <berick@esilibrary.com>
Fri, 12 Apr 2013 19:19:58 +0000 (12:19 -0700)
committerBill Erickson <berick@esilibrary.com>
Fri, 12 Apr 2013 19:19:58 +0000 (12:19 -0700)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
eg-2013-test-data-lightning.txt [new file with mode: 0644]

diff --git a/eg-2013-test-data-lightning.txt b/eg-2013-test-data-lightning.txt
new file mode 100644 (file)
index 0000000..2510cf8
--- /dev/null
@@ -0,0 +1,71 @@
+Hackfest Update: Adding Test Data and Tests
+===========================================
+:author: Bill Erickson, Galen Charlton
+:backend:   slidy2
+:max-width: 45em
+:data-uri:
+
+Overview
+--------
+
+Hacking away at unit tests and sample data for Evergreen.
+
+ * Building a small data set for pgTAP tests
+ * Building a larger data set for user/UI testing and demos
+ * Creating pgTAP unit tests
+
+Unit Tests for pgTAP
+--------------------
+
+Regression test for LP#1155329
+
+[source,sql]
+----------------------------------------------------------------------------
+BEGIN;
+
+SELECT plan(2);
+
+UPDATE config.internal_flag SET enabled = FALSE WHERE name = 'cat.bib.use_id_for_tcn';
+INSERT INTO biblio.record_entry (marc, last_xact_id)
+VALUES ('<record xmlns="http://www.loc.gov/MARC21/slim"/>', 'test');
+
+SELECT matches((SELECT tcn_value FROM biblio.record_entry 
+               WHERE id = CURRVAL('biblio.record_entry_id_seq')),
+               '^AUTOGENERATED-',
+               'TCN is autogenerated when cat.bib.use_id_for_tcn is disabled');
+
+UPDATE config.internal_flag SET enabled = TRUE WHERE name = 'cat.bib.use_id_for_tcn';
+INSERT INTO biblio.record_entry (marc, last_xact_id)
+VALUES ('<record xmlns="http://www.loc.gov/MARC21/slim"/>', 'test');
+SELECT is((SELECT tcn_value FROM biblio.record_entry 
+          WHERE id = CURRVAL('biblio.record_entry_id_seq')),
+          (SELECT CURRVAL('biblio.record_entry_id_seq')::TEXT), 
+          'TCN equals BRE ID when cat.bib.use_id_for_tcn is enabled');
+----------------------------------------------------------------------------
+
+Loading copy locations (LP #1155771)
+------------------------------------
+
+ * Adding copy locations and location groups
+
+[source,sql]
+----------------------------------------------------------------------------
+INSERT INTO asset.copy_location (id, owning_lib, name) VALUES
+(2,  1, 'Reference'),
+(3,  4, 'Reference'),
+(4,  4, 'Easy Reader'),
+-- ...
+----------------------------------------------------------------------------
+
+Call For Data
+-------------
+
+ * Special thanks to Dan Scott, Rogan Hamby, Yamil Suarez, Jeff Davis
+  ** Bib records, Authority data, and Acquisitions sample data
+ * We will take your small data sets, no SQL required (but appreciated)
+
+
+////
+vim: ft=asciidoc
+////
+