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
Cédric Le Ninivin
slapos.core
Commits
5fe47955
Commit
5fe47955
authored
Dec 11, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pylinting
parent
1622801a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
slapos/tests/slap.py
slapos/tests/slap.py
+1
-5
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+1
-1
slapos/tests/slapobject.py
slapos/tests/slapobject.py
+1
-1
No files found.
slapos/tests/slap.py
View file @
5fe47955
...
@@ -209,8 +209,7 @@ class TestSlap(SlapMixin):
...
@@ -209,8 +209,7 @@ class TestSlap(SlapMixin):
if
parsed_url
.
path
==
'registerComputerPartition'
and
\
if
parsed_url
.
path
==
'registerComputerPartition'
and
\
parsed_qs
[
'computer_reference'
][
0
]
==
computer_guid
and
\
parsed_qs
[
'computer_reference'
][
0
]
==
computer_guid
and
\
parsed_qs
[
'computer_partition_reference'
][
0
]
==
partition_id
:
parsed_qs
[
'computer_partition_reference'
][
0
]
==
partition_id
:
partition
=
slapos
.
slap
.
ComputerPartition
(
slapos
.
slap
.
ComputerPartition
(
computer_guid
,
partition_id
)
computer_guid
,
partition_id
)
return
(
404
,
{},
''
)
return
(
404
,
{},
''
)
else
:
else
:
return
(
0
,
{},
''
)
return
(
0
,
{},
''
)
...
@@ -299,7 +298,6 @@ class TestComputer(SlapMixin):
...
@@ -299,7 +298,6 @@ class TestComputer(SlapMixin):
slap
=
self
.
slap
slap
=
self
.
slap
slap
.
initializeConnection
(
self
.
server_url
)
slap
.
initializeConnection
(
self
.
server_url
)
partition_id
=
'PARTITION_01'
def
server_response
(
self
,
path
,
method
,
body
,
header
):
def
server_response
(
self
,
path
,
method
,
body
,
header
):
parsed_url
=
urlparse
.
urlparse
(
path
.
lstrip
(
'/'
))
parsed_url
=
urlparse
.
urlparse
(
path
.
lstrip
(
'/'
))
parsed_qs
=
urlparse
.
parse_qs
(
parsed_url
.
query
)
parsed_qs
=
urlparse
.
parse_qs
(
parsed_url
.
query
)
...
@@ -419,7 +417,6 @@ class TestComputerPartition(SlapMixin):
...
@@ -419,7 +417,6 @@ class TestComputerPartition(SlapMixin):
def
test_request_sends_request
(
self
):
def
test_request_sends_request
(
self
):
partition_id
=
'PARTITION_01'
partition_id
=
'PARTITION_01'
request_called_amount
=
0
def
server_response
(
self
,
path
,
method
,
body
,
header
):
def
server_response
(
self
,
path
,
method
,
body
,
header
):
parsed_url
=
urlparse
.
urlparse
(
path
.
lstrip
(
'/'
))
parsed_url
=
urlparse
.
urlparse
(
path
.
lstrip
(
'/'
))
parsed_qs
=
urlparse
.
parse_qs
(
parsed_url
.
query
)
parsed_qs
=
urlparse
.
parse_qs
(
parsed_url
.
query
)
...
@@ -775,7 +772,6 @@ class TestOpenOrder(SlapMixin):
...
@@ -775,7 +772,6 @@ class TestOpenOrder(SlapMixin):
computer_guid
=
self
.
_getTestComputerId
()
computer_guid
=
self
.
_getTestComputerId
()
requested_partition_id
=
'PARTITION_01'
requested_partition_id
=
'PARTITION_01'
def
server_response
(
self
,
path
,
method
,
body
,
header
):
def
server_response
(
self
,
path
,
method
,
body
,
header
):
parsed_url
=
urlparse
.
urlparse
(
path
.
lstrip
(
'/'
))
from
slapos.slap.slap
import
SoftwareInstance
from
slapos.slap.slap
import
SoftwareInstance
slap_partition
=
SoftwareInstance
(
slap_partition
=
SoftwareInstance
(
slap_computer_id
=
computer_guid
,
slap_computer_id
=
computer_guid
,
...
...
slapos/tests/slapgrid.py
View file @
5fe47955
...
@@ -430,7 +430,7 @@ class TestSlapgridCPWithMaster(MasterMixin, unittest.TestCase):
...
@@ -430,7 +430,7 @@ class TestSlapgridCPWithMaster(MasterMixin, unittest.TestCase):
def
test_nothing_to_do
(
self
):
def
test_nothing_to_do
(
self
):
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
,
0
,
0
)
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
,
0
,
0
)
self
.
assertEqual
(
self
.
grid
.
processComputerPartitionList
(),
slapgrid
.
SLAPGRID_SUCCESS
)
self
.
assertEqual
(
self
.
grid
.
processComputerPartitionList
(),
slapgrid
.
SLAPGRID_SUCCESS
)
self
.
assertSortedListEqual
(
os
.
listdir
(
self
.
instance_root
),
[
'etc'
,
'var'
])
self
.
assertSortedListEqual
(
os
.
listdir
(
self
.
instance_root
),
[
'etc'
,
'var'
])
...
...
slapos/tests/slapobject.py
View file @
5fe47955
...
@@ -173,7 +173,7 @@ class TestSoftwareSlapObject(BasicMixin, unittest.TestCase):
...
@@ -173,7 +173,7 @@ class TestSoftwareSlapObject(BasicMixin, unittest.TestCase):
)
)
software
.
install
()
software
.
install
()
def
test_software_install_networkcache_upload_blacklist
(
self
):
def
test_software_install_networkcache_upload_blacklist
_side_effect
(
self
):
"""
"""
Check if the networkcache upload blacklist parameters only prevent
Check if the networkcache upload blacklist parameters only prevent
blacklisted Software Release to be uploaded.
blacklisted Software Release to be uploaded.
...
...
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