Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
caucase
Commits
87cae25c
Commit
87cae25c
authored
Feb 12, 2021
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell/caucase.sh: Factorise self-test failure codepath.
parent
e5e13cd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
shell/caucase.sh
shell/caucase.sh
+12
-18
No files found.
shell/caucase.sh
View file @
87cae25c
...
...
@@ -1190,6 +1190,12 @@ EOF
caucased_dir
\
caucased_type
\
caucased_pid
_fail
()
{
# shellcheck disable=SC2059
printf
"
$@
"
find
.
-ls
exit
1
}
echo
'Automated testing...'
if
command
-v
caucased
>
/dev/null
;
then
caucased_type
=
"path"
...
...
@@ -1288,29 +1294,21 @@ EOF
|
sed
's/\s.*//'
\
)
"
if
[
!
-d
cas_crt
]
;
then
echo
'cas_crt not created'
find
.
-ls
return
1
_fail
'cas_crt not created\n'
fi
for
cas_file
in
cas_crt/
*
;
do
if
[
-r
"
$cas_file
"
]
&&
[
!
-h
"
$cas_file
"
]
;
then
if
[
"
$cas_found
"
-eq
1
]
;
then
echo
'Multiple CAS CA certificates found'
find
.
-ls
return
1
_fail
'Multiple CAS CA certificates found\n'
fi
cas_found
=
1
fi
done
if
[
"
$cas_found
"
-eq
0
]
;
then
echo
'No CAS CA certificates found, but directory exists'
find
.
-ls
return
1
_fail
'No CAS CA certificates found, but directory exists\n'
fi
if
[
!
-f
cau.crt.pem
]
;
then
echo
'cau.crt.pem not created'
find
.
-ls
return
1
_fail
'cau.crt.pem not created\n'
fi
echo
'Retrieving auto-issued user certificate...'
if
_main
\
...
...
@@ -1321,9 +1319,7 @@ EOF
then
:
else
echo
'Failed to receive signed user certificate.'
find
.
-ls
return
1
_fail
'Failed to receive signed user certificate.\n'
fi
echo
'Using the user certificate...'
if
_main
\
...
...
@@ -1334,9 +1330,7 @@ EOF
>
/dev/null
;
then
:
else
echo
'Failed to list pending CSR, authentication failed ?'
find
.
-ls
return
1
_fail
'Failed to list pending CSR, authentication failed ?\n'
fi
echo
'Success'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment