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 Gambier
slapos.core
Commits
b79d59db
Commit
b79d59db
authored
Sep 24, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup: delete previous certificates files before running unit tests
parent
11d1d33f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
master/product/SlapOS/tests/testSlapOSMixin.py
master/product/SlapOS/tests/testSlapOSMixin.py
+18
-0
No files found.
master/product/SlapOS/tests/testSlapOSMixin.py
View file @
b79d59db
...
@@ -34,6 +34,7 @@ import functools
...
@@ -34,6 +34,7 @@ import functools
from
Products.ERP5Type.tests.utils
import
DummyMailHost
from
Products.ERP5Type.tests.utils
import
DummyMailHost
from
Products.ERP5Type.Utils
import
convertToUpperCase
from
Products.ERP5Type.Utils
import
convertToUpperCase
import
os
import
os
import
glob
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
from
AccessControl.SecurityManagement
import
getSecurityManager
,
\
setSecurityManager
setSecurityManager
...
@@ -81,6 +82,23 @@ class testSlapOSMixin(ERP5TypeTestCase):
...
@@ -81,6 +82,23 @@ class testSlapOSMixin(ERP5TypeTestCase):
open
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'crlnumber'
),
'w'
).
write
(
open
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'crlnumber'
),
'w'
).
write
(
'01'
)
'01'
)
open
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'index.txt'
),
'w'
).
write
(
''
)
open
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'index.txt'
),
'w'
).
write
(
''
)
private_list
=
glob
.
glob
(
'%s/*.key'
%
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'private'
))
for
private
in
private_list
:
os
.
remove
(
private
)
crl_list
=
glob
.
glob
(
'%s/*'
%
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'crl'
))
for
crl
in
crl_list
:
os
.
remove
(
crl
)
certs_list
=
glob
.
glob
(
'%s/*'
%
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'certs'
))
for
cert
in
certs_list
:
os
.
remove
(
cert
)
newcerts_list
=
glob
.
glob
(
'%s/*'
%
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'newcerts'
))
for
newcert
in
newcerts_list
:
os
.
remove
(
newcert
)
def
setupPortalAlarms
(
self
):
def
setupPortalAlarms
(
self
):
if
not
self
.
portal
.
portal_alarms
.
isSubscribed
():
if
not
self
.
portal
.
portal_alarms
.
isSubscribed
():
...
...
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