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
4282d275
Commit
4282d275
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- added tests for help
parent
6248f0b3
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/02-init.t
+13
-3
13 additions, 3 deletions
t/02-init.t
with
13 additions
and
3 deletions
t/02-init.t
+
13
−
3
View file @
4282d275
use
v5
.36
;
use
Test::
Cmd
;
use
Test::
More
tests
=>
1
0
;
use
Test::
More
tests
=>
1
9
;
use
Path::
Tiny
;
my
$perl
=
$^X
;
my
$testapp
=
Test::
Cmd
->
new
(
...
...
@@ -24,13 +24,24 @@ use_ok("SLUB::LZA::TA::Crypt");
is
(
SLUB::LZA::TA::Crypt::
encrypt
("
199fc76b9d086d8937976634e93413bcd005d941
"),
"
839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f980ad83d39008ad638bc41e2345
",
"
ta-tool, init, check encryption
");
is
(
SLUB::LZA::TA::Crypt::
decrypt
("
839852bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f980ad83d39008ad638bc41e2345
"),
"
199fc76b9d086d8937976634e93413bcd005d941
",
"
ta-tool, init, check encryption
");
ok
(
$testapp
,
"
init 'ta-tool'
");
foreach
my
$param
("
help init
",
"
init -h
",
"
init --help
")
{
$testapp
->
run
(
args
=>
$param
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
like
(
$testapp
->
stdout
,
qr/this usage screen/
,
"
ta-tool
$param
, stdout
");
like
(
$testapp
->
stderr
,
qr/^$/
,
"
ta-tool
$param
, stderr
");
is
(
$?
>>
8
,
0
,
"
ta-tool
$param
, exit status
");
}
$testapp
->
run
(
stdin
=>
<<
_EOF_
,
lza
199
fc76b9d086d8937976634e93413bcd005d941
199
fc76b9d086d8937976634e93413bcd005d941
_EOF_
args
=>
'
-v init -e sdvlzaamtestfotothek01.slub-dresden.de -l /tmp
',
args
=>
'
init -v -e sdvlzaamtestfotothek01.slub-dresden.de
',
#args => 'init -e sdvlzaamtestfotothek01.slub-dresden.de -l /tmp',
);
#say "STDOUT:",$testapp->stdout;
#say "STDERR:",$testapp->stderr;
...
...
@@ -44,7 +55,6 @@ is($config, <<_EXP_, "ta-tool init, config file as expected");
elasticsearch_host:
sdvlzaamtestfotothek01
.
slub
-
dresden
.
de
elasticsearch_port:
9200
http_only:
~
logdir:
/
tmp
password:
839852
bed005a7f1237578a6ac1197c142f7d0dd58bb248446dc7849d4bf770902e7f980ad83d39008ad638bc41e2345
user:
lza
_EXP_
...
...
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