From d33552f871946a874ff2c912c65a5b12102f841d Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 16 Feb 2018 16:00:34 +0100 Subject: [PATCH] Bug 19821: Install sample data, ES mappings and Version syspref Also move .proverc to .proverc.dist, so it cannot be used by accident. Different ways to use it: 1/ prove --rc .proverc.dist Use defaults 2/ cp .proverc.dist .proverc && prove Allows to configure db name, marcflavour, and prove options Signed-off-by: Martin Renvoize Signed-off-by: Bouzid Fergani Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart --- .proverc | 1 - .proverc.dist | 1 + t/lib/Bootstrap.pm | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 .proverc create mode 100644 .proverc.dist diff --git a/.proverc b/.proverc deleted file mode 100644 index c5b8cf5053..0000000000 --- a/.proverc +++ /dev/null @@ -1 +0,0 @@ --Mt::lib::Bootstrap=database,koha_test diff --git a/.proverc.dist b/.proverc.dist new file mode 100644 index 0000000000..d73f363141 --- /dev/null +++ b/.proverc.dist @@ -0,0 +1 @@ +-Mt::lib::Bootstrap=database,koha_test,marcflavour,MARC21 diff --git a/t/lib/Bootstrap.pm b/t/lib/Bootstrap.pm index 7fac260b99..1b70030536 100644 --- a/t/lib/Bootstrap.pm +++ b/t/lib/Bootstrap.pm @@ -60,14 +60,18 @@ sub import { $installer->load_db_schema(); $installer->set_marcflavour_syspref($args{marcflavour}); my (undef, $fwklist) = $installer->marc_framework_sql_list('en', $args{marcflavour}); + my (undef, $list) = $installer->sample_data_sql_list('en'); my @frameworks; - foreach my $fwk (@$fwklist) { + foreach my $fwk (@$fwklist, @$list) { foreach my $framework (@{ $fwk->{frameworks} }) { push @frameworks, $framework->{fwkfile}; } } my $all_languages = C4::Languages::getAllLanguages(); $installer->load_sql_in_order($all_languages, @frameworks); + require Koha::SearchEngine::Elasticsearch; + Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings; + $installer->set_version_syspref(); } 1; -- 2.39.5