Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
mediaserver
envsetup
Commits
2c37657a
Commit
2c37657a
authored
8 years ago
by
Florent Thiery
Browse files
Options
Downloads
Patches
Plain Diff
add warning return code (3), do not consider ssl as failure
parent
401c162b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tester.py
+3
-0
3 additions, 0 deletions
tester.py
tests/test_ssl.py
+4
-1
4 additions, 1 deletion
tests/test_ssl.py
with
7 additions
and
1 deletion
tester.py
+
3
−
0
View file @
2c37657a
...
@@ -29,6 +29,7 @@ class Logger(object):
...
@@ -29,6 +29,7 @@ class Logger(object):
def
flush
(
self
):
def
flush
(
self
):
pass
pass
log_buffer
=
StringIO
()
log_buffer
=
StringIO
()
sys
.
stdout
=
Logger
(
sys
.
stdout
,
log_buffer
)
sys
.
stdout
=
Logger
(
sys
.
stdout
,
log_buffer
)
sys
.
stderr
=
sys
.
stdout
sys
.
stderr
=
sys
.
stdout
...
@@ -194,6 +195,8 @@ class Tester():
...
@@ -194,6 +195,8 @@ class Tester():
successes
+=
1
successes
+=
1
elif
p
.
returncode
==
2
:
elif
p
.
returncode
==
2
:
status
=
'
\033
[94mnot testable
\033
[0m
'
status
=
'
\033
[94mnot testable
\033
[0m
'
elif
p
.
returncode
==
3
:
status
=
'
\033
[93mwarning
\033
[0m
'
else
:
else
:
status
=
'
\033
[91mfailure
\033
[0m
'
status
=
'
\033
[91mfailure
\033
[0m
'
failures
+=
1
failures
+=
1
...
...
This diff is collapsed.
Click to expand it.
tests/test_ssl.py
+
4
−
1
View file @
2c37657a
...
@@ -43,4 +43,7 @@ for s in conf_servers:
...
@@ -43,4 +43,7 @@ for s in conf_servers:
except
requests
.
exceptions
.
SSLError
:
except
requests
.
exceptions
.
SSLError
:
print
(
'
%sSSL certificate for %s is not valid%s
'
%
(
RED
,
url
,
DEF
))
print
(
'
%sSSL certificate for %s is not valid%s
'
%
(
RED
,
url
,
DEF
))
all_ok
=
False
all_ok
=
False
sys
.
exit
(
int
(
not
all_ok
))
if
not
all_ok
:
sys
.
exit
(
3
)
else
:
sys
.
exit
(
0
)
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