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

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

Return to bug 17638