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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
33656de8
Commit
33656de8
authored
Oct 31, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test requestStop and requestStart.
parent
ec8e4a16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
134 additions
and
1 deletion
+134
-1
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
...mplateItem/testSlapOSCoreInstanceSlapInterfaceWorkflow.py
+133
-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 @
33656de8
...
@@ -204,6 +204,139 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(testSlapOSMixin):
...
@@ -204,6 +204,139 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(testSlapOSMixin):
)
)
transaction
.
abort
()
transaction
.
abort
()
def
test_requestStop
(
self
):
self
.
login
(
self
.
instance
.
getReference
())
request_kw
=
self
.
request_kw
.
copy
()
self
.
instance
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
'stop_requested'
,
self
.
instance
.
getSlapState
())
transaction
.
abort
()
def
test_requestStop_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
.
requestStop
)
transaction
.
abort
()
# no software_release
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStop
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no software_type
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStop
,
software_release
=
software_release
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no instance_xml
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStop
,
software_release
=
software_release
,
software_type
=
software_type
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no shared
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStop
,
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
.
requestStop
,
software_release
=
software_release
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
shared
=
shared
,
)
transaction
.
abort
()
def
test_requestStart
(
self
):
self
.
login
(
self
.
instance
.
getReference
())
request_kw
=
self
.
request_kw
.
copy
()
self
.
instance
.
requestStop
(
**
request_kw
)
self
.
instance
.
requestStart
(
**
request_kw
)
self
.
assertEqual
(
'start_requested'
,
self
.
instance
.
getSlapState
())
transaction
.
abort
()
def
test_requestStart_required
(
self
):
self
.
login
(
self
.
instance
.
getReference
())
self
.
instance
.
requestStop
(
**
self
.
request_kw
)
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
.
requestStart
)
transaction
.
abort
()
# no software_release
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStart
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no software_type
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStart
,
software_release
=
software_release
,
instance_xml
=
instance_xml
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no instance_xml
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStart
,
software_release
=
software_release
,
software_type
=
software_type
,
sla_xml
=
sla_xml
,
shared
=
shared
,
)
transaction
.
abort
()
# no shared
self
.
assertRaises
(
TypeError
,
self
.
instance
.
requestStart
,
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
.
requestStart
,
software_release
=
software_release
,
software_type
=
software_type
,
instance_xml
=
instance_xml
,
shared
=
shared
,
)
transaction
.
abort
()
class
TestSlapOSCoreSoftwareInstanceRequest
(
testSlapOSMixin
):
class
TestSlapOSCoreSoftwareInstanceRequest
(
testSlapOSMixin
):
"""Tests instance.requestInstance"""
"""Tests instance.requestInstance"""
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
...
...
master/bt5/slapos_cloud/bt/revision
View file @
33656de8
175
176
\ No newline at end of file
\ 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