Bug 17567: Make populate_db.pl initialize ES mappings
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 7 Nov 2016 14:19:03 +0000 (11:19 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Sat, 12 Nov 2016 02:39:35 +0000 (02:39 +0000)
commitf4bd05d00dbbb96215dca1551e4f92961b60cb6f
treedb899190d14b2dd2066de4f99358c0e90da00038
parent62c09397f2c5e5dd1df2c0cccf190c80363b8033
Bug 17567: Make populate_db.pl initialize ES mappings

To test:
- Have a clean install, no DB
- Run populate_db.pl:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ misc/devel/populate_db.pl
- Go to
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
=> FAIL: No mappings
- Delete the DB and create an empty one:
  $ mysql -uroot
  > DROP DATABASE koha_kohadev; CREATE DATABASE koha_kohadev;
  > GRANT ALL PRIVILEGES ON koha_kohadev.* TO
  'koha_kohadev'@'localhost';
- Run populate_db.pl:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ misc/devel/populate_db.pl
- Go to
  http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl
=> SUCCESS: There are mappings!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/devel/populate_db.pl