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
Klaus Wölfel
slapos.core
Commits
f24f54d2
Commit
f24f54d2
authored
Jun 06, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bang on instance only call bang once on the tree.
parent
b3d25b10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
master/product/Vifib/tests/testVifibSlapBang.py
master/product/Vifib/tests/testVifibSlapBang.py
+9
-2
No files found.
master/product/Vifib/tests/testVifibSlapBang.py
View file @
f24f54d2
...
...
@@ -66,6 +66,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
sequence
[
'computer_reference'
],
sequence
[
'computer_partition_reference'
])
slap_computer_partition
.
bang
(
self
.
bang_message
)
sequence
.
edit
(
expected_bang_count
=
1
)
def
stepProcessSoftwareInstanceList
(
self
,
sequence
,
**
kw
):
S0
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'S0_uid'
])
...
...
@@ -95,31 +96,36 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
.
getAggregateValue
(
portal_type
=
'Computer Partition'
).
getReference
()
)
def
checkSoftwareInstanceBangMessage
(
self
,
software_instance
):
def
checkSoftwareInstanceBangMessage
(
self
,
count
,
software_instance
):
bang_list
=
[
q
for
q
in
software_instance
.
Base_getWorkflowHistoryItemList
(
'instance_slap_interface_workflow'
)
if
q
.
action
==
'bang'
]
self
.
assertEqual
(
5
,
len
(
bang_list
))
self
.
assertEqual
(
count
,
len
(
bang_list
))
self
.
assertEqual
(
self
.
bang_message
,
bang_list
[
0
].
comment
)
def
stepCheckS0BangMessage
(
self
,
sequence
,
**
kw
):
self
.
checkSoftwareInstanceBangMessage
(
sequence
[
'expected_bang_count'
],
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'S0_uid'
]))
def
stepCheckS1BangMessage
(
self
,
sequence
,
**
kw
):
self
.
checkSoftwareInstanceBangMessage
(
sequence
[
'expected_bang_count'
],
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'S1_uid'
]))
def
stepCheckS2BangMessage
(
self
,
sequence
,
**
kw
):
self
.
checkSoftwareInstanceBangMessage
(
sequence
[
'expected_bang_count'
],
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'S1_uid'
]))
def
stepCheckS3BangMessage
(
self
,
sequence
,
**
kw
):
self
.
checkSoftwareInstanceBangMessage
(
sequence
[
'expected_bang_count'
],
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'S3_uid'
]))
def
stepCheckS4BangMessage
(
self
,
sequence
,
**
kw
):
self
.
checkSoftwareInstanceBangMessage
(
sequence
[
'expected_bang_count'
],
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'S3_uid'
]))
def
test_bang_computer_partition_complex_tree
(
self
):
...
...
@@ -218,6 +224,7 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
slap_computer
=
self
.
slap
.
registerComputer
(
sequence
[
'computer_reference'
])
slap_computer
.
bang
(
self
.
bang_message
)
sequence
.
edit
(
expected_bang_count
=
5
)
def
stepCheckComputerBangMessage
(
self
,
sequence
,
**
kw
):
computer
=
self
.
portal
.
portal_catalog
.
getResultValue
(
...
...
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