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
Xiaowu Zhang
slapos.core
Commits
219cf237
Commit
219cf237
authored
Dec 15, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test to match with the previous reverts.
parent
f9c12aa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
37 deletions
+26
-37
master/product/Vifib/tests/testVifibSlapBang.py
master/product/Vifib/tests/testVifibSlapBang.py
+26
-28
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+0
-9
No files found.
master/product/Vifib/tests/testVifibSlapBang.py
View file @
219cf237
...
...
@@ -682,32 +682,26 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
sequence_list
.
play
(
self
)
def
stepCheckTreeLooksLikeRenameComplexTree
(
self
,
sequence
,
**
kw
):
computer_guid
=
sequence
[
"computer_reference"
]
hosting_subscription_uid
=
sequence
[
'hosting_subscription_uid'
]
self
.
slap
=
slap
.
slap
()
self
.
slap
.
initializeConnection
(
self
.
server_url
,
timeout
=
None
)
computer
=
self
.
slap
.
registerComputer
(
computer_guid
)
partition_to_process
=
[
partition
for
partition
in
computer
.
getComputerPartitionList
()
if
partition
.
_need_modification
]
self
.
failUnlessEqual
(
len
(
partition_to_process
),
4
)
hosting_subscription
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
hosting_subscription_uid
)
root_software_instance
=
hosting_subscription
.
portal_catalog
.
getResultValue
(
title
=
hosting_subscription
.
getTitle
(),
portal_type
=
"Software Instance"
)
title
=
hosting_subscription
.
getTitle
(),
portal_type
=
"Software Instance"
,
root_uid
=
hosting_subscription_uid
)
self
.
failIfEqual
(
root_software_instance
,
None
)
self
.
failUnlessEqual
(
len
(
root_software_instance
.
getPredecessorList
()),
2
)
children_titles
=
set
([
si
.
getTitle
()
for
si
in
root_software_instance
.
getPredecessorValueList
()])
self
.
failUnless
(
set
([
'children_a'
,
'children_b'
])
<=
children_titles
)
children_b
=
hosting_subscription
.
portal_catalog
.
getResultValue
(
title
=
'children_b'
,
children_b
_child
=
hosting_subscription
.
portal_catalog
.
getResultValue
(
title
=
'children_b
_child
'
,
root_uid
=
hosting_subscription
.
getUid
(),
)
self
.
fail
UnlessEqual
(
len
(
children_b
.
getPredecessorList
()),
1
)
self
.
fail
IfEqual
(
children_b_child
,
None
)
def
test_ComputerPartition_rename_root_and_bang
(
self
):
r"""
...
...
@@ -913,28 +907,32 @@ class TestVifibSlapBang(TestVifibSlapWebServiceMixin):
/ \
| HS: Master |
\
________________________________/
_____/____ _________\
______
________________|_______________
/ \
| SI: Master |
\
________________________________/
_____/_____ _________\
______
/ \
/
\
|
SI: Master
| | SI: Child B Dead |
|
SI: Child A
| | SI: Child B Dead |
\
___________/
\________________/
_____|_____
______|______
/ \
/
\
| SI: Child A |
| SI: GrandChild |
\
___________/
\______________/
______|______
/ \
| SI: GrandChild |
\
______________/
Bang the tree. We espect to have a new C replacing it,
as : _________________________________________________
/ \
| HS: Master |
\
_________________________________________________/
_____________|______________
_______|
________
/
\
/
\
|
SI: Master | | SI: Child B Dead
|
\
____________________________
/
\
________________/
_____/_____ _____\
_____
/ \
/
\
| SI: Child A | | SI: Child B |
\
___________/
\___________/
_____________|______________
_____________
________
/
\
|
SI: Master
|
\
____________________________
_____
________________/
_____/_____ _____\
_____
_______|________
/ \
/
\
/ \
| SI: Child A | | SI: Child B |
| SI: Child B Dead |
\
___________/
\___________/
\
________________/
______|______
/ \
| SI: GrandChild |
...
...
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
219cf237
...
...
@@ -3878,15 +3878,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
)
software_instance
.
rename
(
new_name
=
'%sDead'
%
software_instance
.
getTitle
())
self
.
stepTic
()
parent
=
software_instance
.
getPredecessorRelatedValue
(
portal_type
=
[
"Hosting Subscription"
,
"Software Instance"
,
"Slave Instance"
]
)
self
.
assertEquals
(
hosting_subscription
,
parent
,
"Software Instance wasn't reattached to the hosting "
"subscription"
)
def
stepCheckTreeHasARootSoftwareInstance
(
self
,
sequence
,
**
kw
):
hosting_subscription_uid
=
sequence
[
'hosting_subscription_uid'
]
...
...
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