Skip to content
Snippets Groups Projects
Commit 592f1e2f authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- fix search tests: result order can change, increase maxrecords to expected result count

parent 7cc55e21
No related branches found
No related tags found
No related merge requests found
Pipeline #7850 passed
......@@ -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');
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment