From 8024039af187e6fbaea0bce01f1ab9d7a9a5f7f3 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 12 Apr 2013 12:19:58 -0700 Subject: [PATCH] eg 2013 lightning talk Signed-off-by: Bill Erickson --- eg-2013-test-data-lightning.txt | 71 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 eg-2013-test-data-lightning.txt diff --git a/eg-2013-test-data-lightning.txt b/eg-2013-test-data-lightning.txt new file mode 100644 index 000000000..2510cf84b --- /dev/null +++ b/eg-2013-test-data-lightning.txt @@ -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 ('', '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 ('', '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 +//// + -- 2.11.0