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
f9226b4b
Commit
f9226b4b
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- added overrides tests
parent
2d8f96af
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
t/03-count.t
+8
-1
8 additions, 1 deletion
t/03-count.t
t/03-info.t
+4
-4
4 additions, 4 deletions
t/03-info.t
t/03-report.t
+9
-2
9 additions, 2 deletions
t/03-report.t
t/03-search.t
+9
-1
9 additions, 1 deletion
t/03-search.t
with
30 additions
and
8 deletions
t/03-count.t
+
8
−
1
View file @
f9226b4b
use
v5
.36
;
use
v5
.36
;
use
Test::
Cmd
;
use
Test::
Cmd
;
use
Test::
More
tests
=>
27
;
use
Test::
More
tests
=>
30
;
use
Path::
Tiny
;
use
Path::
Tiny
;
my
$perl
=
$^X
;
my
$perl
=
$^X
;
my
$testapp
=
Test::
Cmd
->
new
(
my
$testapp
=
Test::
Cmd
->
new
(
...
@@ -97,5 +97,12 @@ like($testapp->stdout, qr/^25$/, 'ta-tool count dates, existing, stdout');
...
@@ -97,5 +97,12 @@ like($testapp->stdout, qr/^25$/, 'ta-tool count dates, existing, stdout');
like
(
$testapp
->
stderr
,
qr/^$/
,
'
ta-tool count dates, existing, stderr
');
like
(
$testapp
->
stderr
,
qr/^$/
,
'
ta-tool count dates, existing, stderr
');
is
(
$?
>>
8
,
0
,
'
ta-tool count dates, existing, exit status
');
is
(
$?
>>
8
,
0
,
'
ta-tool count dates, existing, exit status
');
note
"
overrides
";
$testapp
->
run
(
args
=>
'
count --elasticsearch-host localhost --creationdate 2023-09-05...2023-12-22
');
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like
(
$testapp
->
stdout
,
qr/^$/
,
'
ta-tool count dates, existing, override, stdout
');
like
(
$testapp
->
stderr
,
qr/^Hint: override local config with/
,
'
ta-tool count dates, existing, override, stderr
');
is
(
$?
>>
8
,
111
,
'
ta-tool count dates, existing, override, exit status
');
1
;
1
;
This diff is collapsed.
Click to expand it.
t/03-info.t
+
4
−
4
View file @
f9226b4b
...
@@ -27,7 +27,6 @@ password: 839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f9
...
@@ -27,7 +27,6 @@ password: 839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f9
user:
lza
user:
lza
_CFG_
_CFG_
# tests
# tests
note
"
help check
";
note
"
help check
";
foreach
my
$param
("
help info
",
"
info -h
",
"
info --help
")
{
foreach
my
$param
("
help info
",
"
info -h
",
"
info --help
")
{
$testapp
->
run
(
args
=>
$param
);
$testapp
->
run
(
args
=>
$param
);
...
@@ -44,12 +43,13 @@ like($testapp->stdout, qr/^6\.\d\.\d{1,2}$/, 'ta-tool elasticsearch version, std
...
@@ -44,12 +43,13 @@ like($testapp->stdout, qr/^6\.\d\.\d{1,2}$/, 'ta-tool elasticsearch version, std
like
(
$testapp
->
stderr
,
qr/^$/
,
'
ta-tool elasticsearch version, stderr
');
like
(
$testapp
->
stderr
,
qr/^$/
,
'
ta-tool elasticsearch version, stderr
');
is
(
$?
>>
8
,
0
,
'
ta-tool elasticsearch version, exit status
');
is
(
$?
>>
8
,
0
,
'
ta-tool elasticsearch version, exit status
');
note
"
overrides
";
$testapp
->
run
(
args
=>
'
info --elasticsearch-host localhost --target-version
');
$testapp
->
run
(
args
=>
'
info --elasticsearch-host localhost --target-version
');
#say "STDOUT:",$testapp->stdout;
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
#say "STDERR:",$testapp->stderr;
like
(
$testapp
->
stdout
,
qr/^$/
,
'
ta-tool elasticsearch version, stdout
');
like
(
$testapp
->
stdout
,
qr/^$/
,
'
ta-tool elasticsearch version,
override,
stdout
');
like
(
$testapp
->
stderr
,
qr/^Hint: override local config/
,
'
ta-tool elasticsearch version, stderr
');
like
(
$testapp
->
stderr
,
qr/^Hint: override local config/
,
'
ta-tool elasticsearch version,
override,
stderr
');
is
(
$?
>>
8
,
111
,
'
ta-tool elasticsearch version, exit status
');
is
(
$?
>>
8
,
111
,
'
ta-tool elasticsearch version,
override,
exit status
');
1
;
1
;
This diff is collapsed.
Click to expand it.
t/03-report.t
+
9
−
2
View file @
f9226b4b
use
v5
.36
;
use
v5
.36
;
use
Test::
Cmd
;
use
Test::
Cmd
;
use
Test::
More
tests
=>
1
5
;
use
Test::
More
tests
=>
1
8
;
use
Path::
Tiny
;
use
Path::
Tiny
;
my
$perl
=
$^X
;
my
$perl
=
$^X
;
my
$testapp
=
Test::
Cmd
->
new
(
my
$testapp
=
Test::
Cmd
->
new
(
...
@@ -52,3 +51,11 @@ $testapp->run(args =>'report --output-as-csv');
...
@@ -52,3 +51,11 @@ $testapp->run(args =>'report --output-as-csv');
like($testapp->stdout, qr/^"set","subset","aip_state","flavour","value"\n"([a-z]+)",,"([a-z]+)","([a-z]+)",\d+(\.\d+)?\n/s,
'
ta
-
tool
report
,
base
,
stdout
'
);
like($testapp->stdout, qr/^"set","subset","aip_state","flavour","value"\n"([a-z]+)",,"([a-z]+)","([a-z]+)",\d+(\.\d+)?\n/s,
'
ta
-
tool
report
,
base
,
stdout
'
);
like($testapp->stderr, qr/^reporting for period/s,
'
ta
-
tool
report
,
base
,
stderr
'
);
like($testapp->stderr, qr/^reporting for period/s,
'
ta
-
tool
report
,
base
,
stderr
'
);
is($? >> 8, 0,
'
ta
-
tool
report
,
base
,
exit
status
'
);
is($? >> 8, 0,
'
ta
-
tool
report
,
base
,
exit
status
'
);
note "overrides";
$testapp->run(args =>
'
report
--
elasticsearch
-
host
localhost
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/^$/s,
'
ta
-
tool
report
,
base
,
stdout
'
);
like($testapp->stderr, qr/^Hint: override local config with/s,
'
ta
-
tool
report
,
base
,
stderr
'
);
is($? >> 8, 111,
'
ta
-
tool
report
,
base
,
exit
status
'
);
This diff is collapsed.
Click to expand it.
t/03-search.t
+
9
−
1
View file @
f9226b4b
use
v5
.36
;
use
v5
.36
;
use
Test::
Cmd
;
use
Test::
Cmd
;
use
Test::
More
tests
=>
1
08
;
use
Test::
More
tests
=>
1
11
;
use
Path::
Tiny
;
use
Path::
Tiny
;
my
$perl
=
$^X
;
my
$perl
=
$^X
;
my
$testapp
=
Test::
Cmd
->
new
(
my
$testapp
=
Test::
Cmd
->
new
(
...
@@ -173,4 +173,12 @@ like($testapp->stdout, qr/\A"aipid"\n"47daf26a-02a1-4776-a8db-de04c6708bd2"\n/s,
...
@@ -173,4 +173,12 @@ like($testapp->stdout, qr/\A"aipid"\n"47daf26a-02a1-4776-a8db-de04c6708bd2"\n/s,
like($testapp->stderr, qr/\Afound 25 results\nreporting results 1 … 10 output as csv/s,
'
ta
-
tool
search
dates
,
existing
,
stderr
'
);
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
'
);
is($? >> 8, 0,
'
ta
-
tool
search
dates
,
existing
,
exit
status
'
);
note "overrides";
$testapp->run(args =>
'
search
--
elasticsearch
-
host
localhost
--
creationdate
2023
-
09
-
05
...
2023
-
12
-
22
'
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like($testapp->stdout, qr/^$/s,
'
ta
-
tool
search
dates
,
existing
,
override
,
stdout
'
);
like($testapp->stderr, qr/^Hint: override local config with/s,
'
ta
-
tool
search
dates
,
existing
,
override
stderr
'
);
is($? >> 8, 111,
'
ta
-
tool
search
dates
,
existing
,
override
,
exit
status
'
);
1;
1;
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