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
Paul Graydon
slapos.core
Commits
bf55027a
Commit
bf55027a
authored
May 25, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use proper method call.
Also rename expected exception.
parent
c24bfbdd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
7 deletions
+33
-7
master/product/Vifib/tests/testVifibSlapBug.py
master/product/Vifib/tests/testVifibSlapBug.py
+1
-1
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+32
-6
No files found.
master/product/Vifib/tests/testVifibSlapBug.py
View file @
bf55027a
...
...
@@ -78,7 +78,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
.
prepare_installed_computer_partition_sequence_string
+
"""
LoginTestVifibCustomer
RequestSoftwareInstanceDestroy
RequestSoftwareInstanceDestroyRaises
ValueError
RequestSoftwareInstanceDestroyRaises
UnsupportedWorkflowMethod
Tic
Logout
...
...
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
bf55027a
...
...
@@ -677,9 +677,23 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
shared
=
shared
,
)
def
stepRequestSoftwareInstanceDestroyRaisesValueError
(
self
,
sequence
,
**
kw
):
self
.
assertRaises
(
ValueError
,
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
]).
requestDestroyComputerPartition
)
def
stepRequestSoftwareInstanceDestroyRaisesUnsupportedWorkflowMethod
(
self
,
sequence
,
**
kw
):
instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
if
instance
.
getPortalType
()
==
"Software Instance"
:
shared
=
False
elif
instance
.
getPortalType
()
==
"Slave Instance"
:
shared
=
True
else
:
raise
NotImplementedError
self
.
assertRaises
(
UnsupportedWorkflowMethod
,
instance
.
requestDestroy
,
software_release
=
instance
.
getRootSoftwareReleaseUrl
(),
instance_xml
=
instance
.
getTextContent
(),
software_type
=
instance
.
getSourceReference
(),
sla_xml
=
instance
.
getSlaXml
(),
shared
=
shared
,
)
def
stepRequestSoftwareInstanceStart
(
self
,
sequence
,
**
kw
):
self
.
portal
.
portal_catalog
.
getResultValue
(
...
...
@@ -2222,10 +2236,22 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Base
.
serialize_call
=
Base
.
serialize
Base
.
serialize
=
verify_serialize_call
instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
if
instance
.
getPortalType
()
==
"Software Instance"
:
shared
=
False
elif
instance
.
getPortalType
()
==
"Slave Instance"
:
shared
=
True
else
:
raise
NotImplementedError
try
:
self
.
assertRaises
(
DummyTestException
,
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
]).
requestDestroyComputerPartition
)
self
.
assertRaises
(
DummyTestException
,
instance
.
requestDestroy
,
software_release
=
instance
.
getRootSoftwareReleaseUrl
(),
instance_xml
=
instance
.
getTextContent
(),
software_type
=
instance
.
getSourceReference
(),
sla_xml
=
instance
.
getSlaXml
(),
shared
=
shared
,
)
finally
:
Base
.
serialize
=
Base
.
serialize_call
...
...
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