From 592f1e2f065fcd3f1cc238521115b97a51dee0fb Mon Sep 17 00:00:00 2001 From: Jens Steidl <Jens.Steidl@slub-dresden.de> Date: Fri, 15 Nov 2024 15:18:55 +0100 Subject: [PATCH] - fix search tests: result order can change, increase maxrecords to expected result count --- t/03-search.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/03-search.t b/t/03-search.t index 822b941..c4c7ca3 100644 --- a/t/03-search.t +++ b/t/03-search.t @@ -74,11 +74,11 @@ subtest 'elastic search existing dc entry' => sub { plan tests => 3; SKIP: { skip "testhost '$host' not available", 3 unless Test::TA::is_testhost_available(); - $testapp->run(args => 'search --descriptive "Retrodigitalisierte Fotosn"'); #SLUB:LZA:testworkflow:testcases:test-sip_2023-01-01-11_11-11_11111'); + $testapp->run(args => 'search --descriptive "Retrodigitalisierte Fotosn" --maxrecords 30'); #SLUB:LZA:testworkflow:testcases:test-sip_2023-01-01-11_11-11_11111'); #say "STDOUT:",$testapp->stdout; #say "STDERR:",$testapp->stderr; - like($testapp->stdout, qr/\A"aipid"\n"6ae5f1f0-5306-404f-8fb7-445f82416932"\n"9a254f9d-1c19-478a-aacb-43be3a3c7d9d"\n.*"4f7516e4-23c8-4750-a411-91359fb7a869"\Z/s, 'ta-tool search by dc, existing, stdout'); - like($testapp->stderr, qr/\Afound 30 results\nreporting results 1 … 10 output as csv\Z/s, 'ta-tool search by dc, existing, stderr'); + like($testapp->stdout, qr/\A"aipid"\n"6ae5f1f0-5306-404f-8fb7-445f82416932"\n"9a254f9d-1c19-478a-aacb-43be3a3c7d9d"\n.*"4f7516e4-23c8-4750-a411-91359fb7a869".*\Z/s, 'ta-tool search by dc, existing, stdout'); + like($testapp->stderr, qr/\Afound 30 results\nreporting results 1 … 30 output as csv\Z/s, 'ta-tool search by dc, existing, stderr'); is($? >> 8, 0, 'ta-tool search by lzaid, existing, exit status'); }; }; -- GitLab