Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
143
Merge Requests
143
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
ae22fb6e
Commit
ae22fb6e
authored
Jan 14, 2025
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runUnitTest: support providing a password for ERP5TypeTestCase
parent
cd3d1baa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+5
-0
product/ERP5Type/tests/runUnitTest.py
product/ERP5Type/tests/runUnitTest.py
+4
-1
No files found.
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
ae22fb6e
...
...
@@ -17,6 +17,7 @@ import string
import
sys
import
time
import
traceback
import
warnings
from
six.moves
import
configparser
from
contextlib
import
contextmanager
from
io
import
BytesIO
...
...
@@ -273,6 +274,10 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase, functional.F
def
newPassword
(
self
):
""" Generate a password """
forced_password
=
os
.
environ
.
get
(
'insecure_erp5_test_password'
)
if
forced_password
:
warnings
.
warn
(
"Using password set from environment variable"
)
return
forced_password
return
''
.
join
(
random
.
SystemRandom
().
sample
(
string
.
ascii_letters
+
string
.
digits
,
20
))
def
login
(
self
,
user_name
=
None
,
quiet
=
0
):
...
...
product/ERP5Type/tests/runUnitTest.py
View file @
ae22fb6e
...
...
@@ -798,7 +798,8 @@ def main(argument_list=None):
"sys_path="
,
"instance_home="
,
"log_directory="
,
"with_wendelin_core"
"with_wendelin_core"
,
"insecure_password="
,
])
except
getopt
.
GetoptError
as
msg
:
usage
(
sys
.
stderr
,
msg
)
...
...
@@ -919,6 +920,8 @@ def main(argument_list=None):
_log_directory
=
os
.
path
.
abspath
(
arg
)
elif
opt
==
"--with_wendelin_core"
:
os
.
environ
[
"with_wendelin_core"
]
=
"1"
elif
opt
==
"--insecure_password"
:
os
.
environ
[
"insecure_erp5_test_password"
]
=
arg
setupWarnings
()
...
...
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