Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.libnetworkcache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.libnetworkcache
Commits
35a73567
Commit
35a73567
authored
Jun 25, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test_generate_certificate
parent
d423a1c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
slapos/libnetworkcachetests.py
slapos/libnetworkcachetests.py
+3
-1
No files found.
slapos/libnetworkcachetests.py
View file @
35a73567
import
BaseHTTPServer
import
datetime
import
errno
import
hashlib
import
httplib
...
...
@@ -924,12 +925,13 @@ class GenerateSignatureScriptTest(unittest.TestCase):
def
test_generate_certificate
(
self
):
slapos
.
signature
.
generateCertificate
(
self
.
certificate
,
self
.
key
,
self
.
common_name
)
today
=
datetime
.
date
.
today
()
result
=
subprocess
.
check_output
([
'openssl'
,
'x509'
,
'-noout'
,
'-subject'
,
'-in'
,
self
.
certificate
])
self
.
assertEqual
(
'subject= /CN=%s'
%
self
.
common_name
,
result
.
strip
())
result
=
subprocess
.
check_output
([
'openssl'
,
'x509'
,
'-noout'
,
'-enddate'
,
'-in'
,
self
.
certificate
])
self
.
assertTrue
(
'
2112'
in
result
)
self
.
assertTrue
(
'
%s '
%
(
today
.
year
+
100
)
in
result
)
def
test_generate_key_exists
(
self
):
self
.
assertRaises
(
ValueError
,
slapos
.
signature
.
generateCertificate
,
...
...
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