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
Ivan Tyagov
slapos.core
Commits
7f45fa10
Commit
7f45fa10
authored
Feb 16, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: fix some trailing whitespaces and inconsistent indentations
parent
55ff948c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
86 deletions
+79
-86
slapos/tests/test_configure_local.py
slapos/tests/test_configure_local.py
+1
-1
slapos/tests/test_promise.py
slapos/tests/test_promise.py
+4
-5
slapos/tests/test_register.py
slapos/tests/test_register.py
+4
-9
slapos/tests/test_slap.py
slapos/tests/test_slap.py
+1
-2
slapos/tests/test_slapformat.py
slapos/tests/test_slapformat.py
+1
-1
slapos/tests/test_slapgrid.py
slapos/tests/test_slapgrid.py
+40
-40
slapos/tests/test_slapproxy.py
slapos/tests/test_slapproxy.py
+28
-28
No files found.
slapos/tests/test_configure_local.py
View file @
7f45fa10
...
...
@@ -31,7 +31,7 @@ import shutil
import
tempfile
import
slapos.slap
import
slapos.cli.configure_local
from
slapos.cli.configure_local
import
ConfigureLocalCommand
,
_createConfigurationDirectory
from
slapos.cli.configure_local
import
ConfigureLocalCommand
,
_createConfigurationDirectory
from
slapos.cli.entry
import
SlapOSApp
from
argparse
import
Namespace
from
six.moves.configparser
import
ConfigParser
...
...
slapos/tests/test_promise.py
View file @
7f45fa10
...
...
@@ -208,7 +208,7 @@ class RunPromise(GenericPromise):
"title": "%(name)s"
}]
}"""
history_file
=
os
.
path
.
join
(
self
.
partition_dir
,
PROMISE_HISTORY_RESULT_FOLDER_NAME
,
'%s.history.json'
%
name
)
self
.
assertTrue
(
os
.
path
.
exists
(
history_file
))
with
open
(
history_file
)
as
f
:
...
...
@@ -411,7 +411,7 @@ class RunPromise(GenericPromise):
self
.
launcher
.
run
()
self
.
assertTrue
(
os
.
path
.
exists
(
state_folder
))
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
log_dir
,
'my_promise.log'
)))
self
.
assertSuccessResult
(
"my_promise"
)
self
.
assertSuccessHistoryResult
(
"my_promise"
)
self
.
assertSuccessStatsResult
(
1
)
...
...
@@ -1577,10 +1577,10 @@ class TestSlapOSGenericPromise(TestSlapOSPromiseMixin):
def
test_promise_cleanup_plugin_dir
(
self
):
stale_pyc
=
os
.
path
.
join
(
self
.
plugin_dir
,
'stale.pyc'
)
with
open
(
stale_pyc
,
'w'
)
as
fh
:
fh
.
write
(
''
)
fh
.
write
(
''
)
stale_pyo
=
os
.
path
.
join
(
self
.
plugin_dir
,
'stale.pyo'
)
with
open
(
stale_pyo
,
'w'
)
as
fh
:
fh
.
write
(
''
)
fh
.
write
(
''
)
self
.
initialisePromise
()
self
.
launcher
.
run
()
self
.
assertFalse
(
os
.
path
.
exists
(
stale_pyc
))
...
...
@@ -2021,4 +2021,3 @@ class RunPromise(GenericPromise):
if
__name__
==
'__main__'
:
unittest
.
main
()
slapos/tests/test_register.py
View file @
7f45fa10
...
...
@@ -40,18 +40,13 @@ class TestRegister(unittest.TestCase):
template
=
slapos
.
cli
.
register
.
fetch_configuration_template
()
self
.
assertNotEqual
(
""
,
template
)
for
entry
in
[
'computer_id'
,
for
entry
in
[
'computer_id'
,
'master_url'
,
'key_file'
,
'key_file'
,
'cert_file'
,
'certificate_repository_path'
,
'interface_name'
,
'interface_name'
,
'ipv4_local_network'
,
'partition_amount'
,
'partition_amount'
,
'create_tap'
]:
self
.
assertTrue
(
entry
in
template
,
"%s is not in template (%s)"
%
(
entry
,
template
))
slapos/tests/test_slap.py
View file @
7f45fa10
...
...
@@ -1471,7 +1471,7 @@ class TestOpenOrder(SlapMixin):
},
"text_content"
:
{
"title"
:
"Parameter XML"
,
"default"
:
dict2xml
({
'_'
:
json
.
dumps
(
parameter_dict
)}),
"default"
:
dict2xml
({
'_'
:
json
.
dumps
(
parameter_dict
)}),
"key"
:
"field_my_text_content"
,
"type"
:
"TextAreaField"
},
...
...
@@ -1689,4 +1689,3 @@ class TestSoftwareProductCollection(SlapMixin):
self
.
product_collection
.
get
)
self
.
assertEqual
(
self
.
product_collection
.
foo
,
'0'
)
slapos/tests/test_slapformat.py
View file @
7f45fa10
...
...
@@ -993,4 +993,4 @@ class TestFormatConfig(SlapformatMixin):
# TODO add more tests with config file
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
slapos/tests/test_slapgrid.py
View file @
7f45fa10
This diff is collapsed.
Click to expand it.
slapos/tests/test_slapproxy.py
View file @
7f45fa10
This diff is collapsed.
Click to expand it.
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