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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
ba2068b7
Commit
ba2068b7
authored
Oct 31, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test instance.requestDestroy
parent
75b8852f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
1 deletion
+65
-1
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
...mplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
+64
-0
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
View file @
ba2068b7
...
...
@@ -139,3 +139,67 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(testSlapOSMixin):
self
.
assertRaises
(
ValueError
,
self
.
instance
.
rename
,
new_name
=
new_name
)
transaction
.
abort
()
def
test_requestDestroy
(
self
):
self
.
login
(
self
.
instance
.
getReference
())
request_kw
=
self
.
request_kw
.
copy
()
self
.
instance
.
requestDestroy
(
**
request_kw
)
self
.
assertEqual
(
'destroy_requested'
,
self
.
instance
.
getSlapState
())
transaction
.
abort
()
def
test_requestDestroy_required
(
self
):
self
.
login
(
self
.
instance
.
getReference
())
software_release
=
self
.
request_kw
[
'software_release'
]
software_type
=
self
.
request_kw
[
'software_type'
]
instance_xml
=
self
.
request_kw
[
'instance_xml'
]
sla_xml
=
self
.
request_kw
[
'sla_xml'
]
shared
=
self
.
request_kw
[
'shared'
]
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestDestroy
)
transaction
.
abort
()
# no software_release
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestDestroy
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no software_type
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestDestroy
,
software_release
=
software_release
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no instance_xml
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestDestroy
,
software_release
=
software_release
,
software_type
=
software_type
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no shared
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestDestroy
,
software_release
=
software_release
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
)
transaction
.
abort
()
# no sla_xml
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestDestroy
,
software_release
=
software_release
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
shared
=
shared
,
)
transaction
.
abort
()
master/bt5/slapos_cloud/bt/revision
View file @
ba2068b7
173
\ No newline at end of file
174
\ No newline at end of file
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