Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.core
Commits
dc2fef14
Commit
dc2fef14
authored
Apr 16, 2019
by
Rafael Monnerat
👻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Invoke creation of certification Authority more often
parent
65d5d08a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
master/product/SlapOS/tests/testSlapOSMixin.py
master/product/SlapOS/tests/testSlapOSMixin.py
+12
-3
No files found.
master/product/SlapOS/tests/testSlapOSMixin.py
View file @
dc2fef14
...
@@ -83,13 +83,22 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -83,13 +83,22 @@ class testSlapOSMixin(ERP5TypeTestCase):
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'private'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'private'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'crl'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'crl'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'certs'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'certs'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'requests'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'newcerts'
))
shutil
.
copy
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'openssl.cnf'
),
original_openssl_cnf
=
open
(
os
.
path
.
join
(
ca_path
,
'openssl.cnf'
))
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'openssl.cnf'
),
"r"
).
read
()
openssl_cnf
=
original_openssl_cnf
.
replace
(
os
.
environ
[
'TEST_CA_PATH'
],
ca_path
)
with
open
(
os
.
path
.
join
(
ca_path
,
'openssl.cnf'
),
"w"
)
as
f
:
f
.
write
(
openssl_cnf
)
shutil
.
copy
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'cacert.pem'
),
shutil
.
copy
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'cacert.pem'
),
os
.
path
.
join
(
ca_path
,
'cacert.pem'
))
os
.
path
.
join
(
ca_path
,
'cacert.pem'
))
shutil
.
copy
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'private'
,
'cakey.pem'
),
os
.
path
.
join
(
ca_path
,
'private'
,
'cakey.pem'
))
# reset test CA to have it always count from 0
# reset test CA to have it always count from 0
open
(
os
.
path
.
join
(
ca_path
,
'serial'
),
'w'
).
write
(
'01'
)
open
(
os
.
path
.
join
(
ca_path
,
'serial'
),
'w'
).
write
(
'01'
)
open
(
os
.
path
.
join
(
ca_path
,
'crlnumber'
),
'w'
).
write
(
'01'
)
open
(
os
.
path
.
join
(
ca_path
,
'crlnumber'
),
'w'
).
write
(
'01'
)
...
@@ -161,6 +170,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -161,6 +170,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
return
return
self
.
portal
.
portal_caches
.
erp5_site_global_id
=
'%s'
%
random
.
random
()
self
.
portal
.
portal_caches
.
erp5_site_global_id
=
'%s'
%
random
.
random
()
self
.
portal
.
portal_caches
.
_p_changed
=
1
self
.
portal
.
portal_caches
.
_p_changed
=
1
self
.
createCertificateAuthorityFile
()
self
.
commit
()
self
.
commit
()
self
.
portal
.
portal_caches
.
updateCache
()
self
.
portal
.
portal_caches
.
updateCache
()
...
@@ -214,7 +224,6 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -214,7 +224,6 @@ class testSlapOSMixin(ERP5TypeTestCase):
def
bootstrapSite
(
self
):
def
bootstrapSite
(
self
):
self
.
setupPortalAlarms
()
self
.
setupPortalAlarms
()
self
.
createCertificateAuthorityFile
()
self
.
getDefaultSystemPreference
().
setPreferredHateoasUrl
(
"http://dummy/"
)
self
.
getDefaultSystemPreference
().
setPreferredHateoasUrl
(
"http://dummy/"
)
self
.
clearCache
()
self
.
clearCache
()
...
...
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