Browse Source

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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Julian Maurice 4 years ago
committed by Jonathan Druart
parent
commit
d33552f871
  1. 1
      .proverc
  2. 1
      .proverc.dist
  3. 6
      t/lib/Bootstrap.pm

1
.proverc

@ -1 +0,0 @@
-Mt::lib::Bootstrap=database,koha_test

1
.proverc.dist

@ -0,0 +1 @@
-Mt::lib::Bootstrap=database,koha_test,marcflavour,MARC21

6
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;

Loading…
Cancel
Save