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
Ophélie Gagnard
slapos.core
Commits
098bb79b
Commit
098bb79b
authored
Apr 05, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cover bug of impossible re-request of destroyed instance.
parent
d45cfad3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
12 deletions
+85
-12
master/product/Vifib/tests/testVifibSlapBug.py
master/product/Vifib/tests/testVifibSlapBug.py
+67
-0
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
+0
-12
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+18
-0
No files found.
master/product/Vifib/tests/testVifibSlapBug.py
View file @
098bb79b
...
@@ -1212,6 +1212,73 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
...
@@ -1212,6 +1212,73 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
def
test_request_new_with_destroyed_while_looking_for_partition_reference
(
self
):
"""Prove that having destroyed SI allows to request new one with same
reference, when destruction was done while looking for new partition"""
self
.
computer_partition_amount
=
0
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
"""
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable
Tic
SlapLogout
SetRandomRequestedReference
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstancePrepare
Tic
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstance
Tic
SlapLogout
LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance
CheckSoftwareInstanceNoDeliveryRelated
Logout
LoginTestVifibCustomer
RequestSoftwareInstanceDestroy
Tic
Logout
LoginDefaultUser
CheckSoftwareInstanceCancelledSaleOrderLine
Tic # in order to give chance to update Open Order
CheckOpenOrderLineRemoved
Logout
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstance
Tic
SlapLogout
LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance
CheckSoftwareInstanceOrderedSaleOrderLine
CheckSoftwareInstanceNoDeliveryRelated
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_request_new_with_destroyed_reference
(
self
):
def
test_request_new_with_destroyed_reference
(
self
):
"""Prove that having destroyed SI allows to request new one with same
"""Prove that having destroyed SI allows to request new one with same
reference"""
reference"""
...
...
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
View file @
098bb79b
...
@@ -128,18 +128,6 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
...
@@ -128,18 +128,6 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
def
stepCheckSoftwareInstanceNoDeliveryRelated
(
self
,
sequence
,
**
kw
):
self
.
assertEqual
(
None
,
self
.
portal
.
portal_catalog
.
getResultValue
(
default_aggregate_uid
=
sequence
[
'software_instance_uid'
],
portal_type
=
self
.
sale_packing_list_line_portal_type
))
def
stepCheckSoftwareInstanceCancelledSaleOrderLine
(
self
,
sequence
,
**
kw
):
self
.
assertEqual
(
'cancelled'
,
self
.
portal
.
portal_catalog
.
getResultValue
(
default_aggregate_uid
=
sequence
[
'software_instance_uid'
],
portal_type
=
self
.
sale_order_line_portal_type
).
getSimulationState
())
def
test_person_destroy_not_instanciable_software_instance
(
self
):
def
test_person_destroy_not_instanciable_software_instance
(
self
):
"""Check that if there is no way to instantiate software instance
"""Check that if there is no way to instantiate software instance
on any partition person is able to destroy it"""
on any partition person is able to destroy it"""
...
...
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
098bb79b
...
@@ -177,6 +177,24 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
...
@@ -177,6 +177,24 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
########################################
########################################
# Steps -- scenarios
# Steps -- scenarios
########################################
########################################
def
stepCheckSoftwareInstanceNoDeliveryRelated
(
self
,
sequence
,
**
kw
):
self
.
assertEqual
(
None
,
self
.
portal
.
portal_catalog
.
getResultValue
(
default_aggregate_uid
=
sequence
[
'software_instance_uid'
],
portal_type
=
self
.
sale_packing_list_line_portal_type
))
def
stepCheckSoftwareInstanceCancelledSaleOrderLine
(
self
,
sequence
,
**
kw
):
self
.
assertEqual
(
'cancelled'
,
self
.
portal
.
portal_catalog
.
getResultValue
(
default_aggregate_uid
=
sequence
[
'software_instance_uid'
],
portal_type
=
self
.
sale_order_line_portal_type
).
getSimulationState
())
def
stepCheckSoftwareInstanceOrderedSaleOrderLine
(
self
,
sequence
,
**
kw
):
self
.
assertEqual
(
'ordered'
,
self
.
portal
.
portal_catalog
.
getResultValue
(
default_aggregate_uid
=
sequence
[
'software_instance_uid'
],
portal_type
=
self
.
sale_order_line_portal_type
).
getSimulationState
())
def
stepCheckOpenOrderLineRemoved
(
self
,
sequence
,
**
kw
):
def
stepCheckOpenOrderLineRemoved
(
self
,
sequence
,
**
kw
):
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
software_instance
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
'software_instance_uid'
])
uid
=
sequence
[
'software_instance_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