Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools for technical analysts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
tools for technical analysts
Commits
c7c09c17
Commit
c7c09c17
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- fixed testcases
parent
83d5974d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
t/03-search.t
+10
-10
10 additions, 10 deletions
t/03-search.t
with
10 additions
and
10 deletions
t/03-search.t
+
10
−
10
View file @
c7c09c17
...
...
@@ -53,14 +53,14 @@ note "elastic search existing lza id";
$testapp->run(args =>
'
search
--
lzaid
SLUB:LZA:testworkflow:testcases:test
-
sip_2023
-
01
-
01
-
11_11
-
11_11111
--
debug
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\Aaipid\n47daf26a-02a1-4776-a8db-de04c6708bd2\Z/s,
'
ta
-
tool
search
by
lzaid
,
existing
,
stdout
'
);
like($testapp->stdout, qr/\A
"
aipid
"
\n
"
47daf26a-02a1-4776-a8db-de04c6708bd2
"
\Z/s,
'
ta
-
tool
search
by
lzaid
,
existing
,
stdout
'
);
like($testapp->stderr, qr/\A\@must.*\@should.*query:.*found 1 result\nreporting results output as csv\Z/s,
'
ta
-
tool
search
by
lzaid
,
existing
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
by
lzaid
,
no
match
,
exit
status
'
);
$testapp->run(args =>
'
search
--
lzaid
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/\Aaipid\n47daf26a-02a1-4776-a8db-de04c6708bd2\Z/s,
'
ta
-
tool
search
by
lzaid
,
existing
,
stdout
'
);
like($testapp->stdout, qr/\A
"
aipid
"
\n
"
47daf26a-02a1-4776-a8db-de04c6708bd2
"
\Z/s,
'
ta
-
tool
search
by
lzaid
,
existing
,
stdout
'
);
like($testapp->stderr, qr/\Afound 1 result\nreporting results output as csv\Z/s,
'
ta
-
tool
search
by
lzaid
,
existing
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
by
lzaid
,
existing
,
exit
status
'
);
...
...
@@ -68,7 +68,7 @@ note "elastic search existing dc entry";
$testapp->run(args =>
'
search
--
descriptive
"
Retrodigitalisierte Fotosn
"'
);#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/\Aaipid\n6ae5f1f0-5306-404f-8fb7-445f82416932\n9a254f9d-1c19-478a-aacb-43be3a3c7d9d\n.*4f7516e4-23c8-4750-a411-91359fb7a869\Z/
s, 'ta-tool search by dc, existing,
stdout
'
);
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
'
);
is($? >> 8, 0,
'
ta
-
tool
search
by
lzaid
,
existing
,
exit
status
'
);
...
...
@@ -83,7 +83,7 @@ is($? >> 8, 0, 'ta-tool search, raw output, exit status');
$testapp->run(args =>
'
search
--
output
-
as
-
csv
--
lzaid
SLUB:LZA:testworkflow:testcases:test
-
sip_2023
-
01
-
01
-
11_11
-
11_11111
--
with
-
lzaid
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\Aaipid
,
slubarchiv_lzaid\n47daf26a-02a1-4776-a8db-de04c6708bd2
,
SLUB:LZA:testworkflow:testcases:test-sip_2023-01-01-11_11-11_11111\Z/s,
'
ta
-
tool
search
,
CSV
output
,
stdout
'
);
like($testapp->stdout, qr/\A
"
aipid
","
slubarchiv_lzaid
"
\n
"
47daf26a-02a1-4776-a8db-de04c6708bd2
","
SLUB:LZA:testworkflow:testcases:test-sip_2023-01-01-11_11-11_11111
"
\Z/s,
'
ta
-
tool
search
,
CSV
output
,
stdout
'
);
like($testapp->stderr, qr/\Afound 1 result\nreporting results output as csv\Z/s,
'
ta
-
tool
search
,
CSV
output
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
,
CSV
output
,
exit
status
'
);
...
...
@@ -121,7 +121,7 @@ foreach my $with (qw(
$testapp->run(args =>
'
search
--
output
-
as
-
csv
--
lzaid
SLUB:LZA:testworkflow:testcases:test
-
sip_2023
-
01
-
01
-
11_11
-
11_11111
'
.$with_opt);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\Aaipid
,
$head\n47daf26a-02a1-4776-a8db-de04c6708bd2
,
[A-Za-zäöüßÄÖÜ0-9_:. -]*\Z/s,
'
ta
-
tool
search
,
check
"
'.
$with_opt
.'
",
stdout
'
);
like($testapp->stdout, qr/\A
"
aipid
","
$head
"
\n
"
47daf26a-02a1-4776-a8db-de04c6708bd2
",("
[A-Za-zäöüßÄÖÜ0-9_:. -]*
")|\d+(\.\d+)?
\Z/s,
'
ta
-
tool
search
,
check
"
'.
$with_opt
.'
",
stdout
'
);
like($testapp->stderr, qr/\Afound 1 result\nreporting results output as csv\Z/s,
'
ta
-
tool
search
,
"
'.
$with_opt
.'
",
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
,
"
'.
$with_opt
.'
",
exit
status
'
);
}
...
...
@@ -129,7 +129,7 @@ note "search by files";
$testapp->run(args =>
'
search
--
pronom
-
id
fmt
/
101
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\Aaipid\n.*47daf26a-02a1-4776-a8db-de04c6708bd2/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stdout
'
);
like($testapp->stdout, qr/\A
"
aipid
"
\n.*
"
47daf26a-02a1-4776-a8db-de04c6708bd2
"
/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stdout
'
);
like($testapp->stderr, qr/\Afound 166 results\nreporting results 1 … 10 output as csv\Z/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
exit
status
'
);
...
...
@@ -137,14 +137,14 @@ note "check paginations";
$testapp->run(args =>
'
search
--
pronom
-
id
fmt
/
101
--
with
-
result
-
index
--
output
-
as
-
csv
--
startrecord
2
--
maxrecords
1
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\A
_
idx
,
aipid\n2,2ed0c682-4565-4320-8247-6da0cc0642f1\Z/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stdout
'
);
like($testapp->stdout, qr/\A
"
idx
","
aipid
"
\n2,
"
2ed0c682-4565-4320-8247-6da0cc0642f1
"
\Z/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stdout
'
);
like($testapp->stderr, qr/\Afound 166 results\nreporting results output as csv\Z/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
exit
status
'
);
$testapp->run(args =>
'
search
--
pronom
-
id
fmt
/
101
--
with
-
result
-
index
--
output
-
as
-
csv
--
startrecord
3
--
maxrecords
2
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\A
_
idx
,
aipid\n3,5687a403-673d-45c1-864f-f7f22a7aadb9\n4,db256475-10bd-40ee-83cc-dab8424346ba\Z/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stdout
'
);
like($testapp->stdout, qr/\A
"
idx
","
aipid
"
\n3,
"
5687a403-673d-45c1-864f-f7f22a7aadb9
"
\n4,
"
db256475-10bd-40ee-83cc-dab8424346ba
"
\Z/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stdout
'
);
like($testapp->stderr, qr/\Afound 166 results\nreporting results 3 … 4 output as csv\Z/s,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
by
pronom
-
id
,
existing
,
exit
status
'
);
...
...
@@ -152,14 +152,14 @@ note "search dates";
$testapp->run(args =>
'
search
--
creationdate
2023
-
09
-
05
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\Aaipid\n47daf26a-02a1-4776-a8db-de04c6708bd2\ne8bfdec5-d201-42d6-b293-94bb1668a7b6\Z/s,
'
ta
-
tool
search
date
,
existing
,
stdout
'
);
like($testapp->stdout, qr/\A
"
aipid
"
\n
"
47daf26a-02a1-4776-a8db-de04c6708bd2
"
\n
"
e8bfdec5-d201-42d6-b293-94bb1668a7b6
"
\Z/s,
'
ta
-
tool
search
date
,
existing
,
stdout
'
);
like($testapp->stderr, qr/\Afound 2 results\nreporting results 1 … 2 output as csv/s,
'
ta
-
tool
search
date
,
existing
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
date
,
existing
,
exit
status
'
);
$testapp->run(args =>
'
search
--
creationdate
2023
-
09
-
05
...
2023
-
12
-
22
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/\Aaipid\n47daf26a-02a1-4776-a8db-de04c6708bd2\n/s,
'
ta
-
tool
search
dates
,
existing
,
stdout
'
);
like($testapp->stdout, qr/\A
"
aipid
"
\n
"
47daf26a-02a1-4776-a8db-de04c6708bd2
"
\n/s,
'
ta
-
tool
search
dates
,
existing
,
stdout
'
);
like($testapp->stderr, qr/\Afound 25 results\nreporting results 1 … 10 output as csv/s,
'
ta
-
tool
search
dates
,
existing
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
search
dates
,
existing
,
exit
status
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment