View | Details | Raw Unified | Return to bug 17638
Collapse All | Expand All

(-)a/t/db_dependent/Search.t (-10 / +17 lines)
Lines 29-39 use open ':std', ':encoding(utf8)'; Link Here
29
29
30
use Test::More tests => 4;
30
use Test::More tests => 4;
31
use Test::MockModule;
31
use Test::MockModule;
32
use Test::Warn;
33
34
use Koha::Caches;
35
32
use MARC::Record;
36
use MARC::Record;
33
use File::Spec;
37
use File::Spec;
34
use File::Basename;
38
use File::Basename;
35
use File::Find;
39
use File::Find;
36
use Test::Warn;
40
37
use File::Temp qw/ tempdir /;
41
use File::Temp qw/ tempdir /;
38
use File::Path;
42
use File::Path;
39
43
Lines 47-67 sub index_sample_records_and_launch_zebra { Link Here
47
    unlink("$datadir/zebra.log");
51
    unlink("$datadir/zebra.log");
48
    if (-f "$sourcedir/${marc_type}/zebraexport/biblio/exported_records") {
52
    if (-f "$sourcedir/${marc_type}/zebraexport/biblio/exported_records") {
49
        my $zebra_bib_cfg = ($indexing_mode eq 'dom') ? 'zebra-biblios-dom.cfg' : 'zebra-biblios.cfg';
53
        my $zebra_bib_cfg = ($indexing_mode eq 'dom') ? 'zebra-biblios-dom.cfg' : 'zebra-biblios.cfg';
50
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal,warn  -g iso2709 -d biblios init");
54
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g iso2709 -d biblios init");
51
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal,warn   -g iso2709 -d biblios update $sourcedir/${marc_type}/zebraexport/biblio");
55
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g iso2709 -d biblios update $sourcedir/${marc_type}/zebraexport/biblio");
52
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal,warn  -g iso2709 -d biblios commit");
56
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g iso2709 -d biblios commit");
53
    }
57
    }
54
    # ... and add large bib records, if present
58
    # ... and add large bib records, if present
55
    if (-f "$sourcedir/${marc_type}/zebraexport/large_biblio_${indexing_mode}/exported_records.xml") {
59
    if (-f "$sourcedir/${marc_type}/zebraexport/large_biblio_${indexing_mode}/exported_records.xml") {
56
        my $zebra_bib_cfg = ($indexing_mode eq 'dom') ? 'zebra-biblios-dom.cfg' : 'zebra-biblios.cfg';
60
        my $zebra_bib_cfg = ($indexing_mode eq 'dom') ? 'zebra-biblios-dom.cfg' : 'zebra-biblios.cfg';
57
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal,warn   -g marcxml -d biblios update $sourcedir/${marc_type}/zebraexport/large_biblio_${indexing_mode}");
61
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g marcxml -d biblios update $sourcedir/${marc_type}/zebraexport/large_biblio_${indexing_mode}");
58
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal,warn  -g marcxml -d biblios commit");
62
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_bib_cfg  -v none,fatal -g marcxml -d biblios commit");
59
    }
63
    }
60
    if (-f "$sourcedir/${marc_type}/zebraexport/authority/exported_records") {
64
    if (-f "$sourcedir/${marc_type}/zebraexport/authority/exported_records") {
61
        my $zebra_auth_cfg = ($indexing_mode eq 'dom') ? 'zebra-authorities-dom.cfg' : 'zebra-authorities.cfg';
65
        my $zebra_auth_cfg = ($indexing_mode eq 'dom') ? 'zebra-authorities-dom.cfg' : 'zebra-authorities.cfg';
62
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal,warn  -g iso2709 -d authorities init");
66
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal -g iso2709 -d authorities init");
63
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal,warn   -g iso2709 -d authorities update $sourcedir/${marc_type}/zebraexport/authority");
67
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal -g iso2709 -d authorities update $sourcedir/${marc_type}/zebraexport/authority");
64
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal,warn  -g iso2709 -d authorities commit");
68
        system("zebraidx -c $datadir/etc/koha/zebradb/$zebra_auth_cfg  -v none,fatal -g iso2709 -d authorities commit");
65
    }
69
    }
66
70
67
    $child = fork();
71
    $child = fork();
Lines 199-204 sub run_marc21_search_tests { Link Here
199
    $datadir = tempdir();
203
    $datadir = tempdir();
200
    system(dirname(__FILE__) . "/zebra_config.pl $datadir marc21 $indexing_mode");
204
    system(dirname(__FILE__) . "/zebra_config.pl $datadir marc21 $indexing_mode");
201
205
206
    Koha::Caches->get_instance('config')->flush_all;
207
202
    mock_GetMarcSubfieldStructure('marc21');
208
    mock_GetMarcSubfieldStructure('marc21');
203
    my $context = new C4::Context("$datadir/etc/koha-conf.xml");
209
    my $context = new C4::Context("$datadir/etc/koha-conf.xml");
204
    $context->set_context();
210
    $context->set_context();
Lines 860-865 sub run_unimarc_search_tests { Link Here
860
    $datadir = tempdir();
866
    $datadir = tempdir();
861
    system(dirname(__FILE__) . "/zebra_config.pl $datadir unimarc $indexing_mode");
867
    system(dirname(__FILE__) . "/zebra_config.pl $datadir unimarc $indexing_mode");
862
868
869
    Koha::Caches->get_instance('config')->flush_all;
870
863
    mock_GetMarcSubfieldStructure('unimarc');
871
    mock_GetMarcSubfieldStructure('unimarc');
864
    my $context = new C4::Context("$datadir/etc/koha-conf.xml");
872
    my $context = new C4::Context("$datadir/etc/koha-conf.xml");
865
    $context->set_context();
873
    $context->set_context();
866
- 

Return to bug 17638