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
Léo-Paul Géneau
slapos.core
Commits
bd5258ff
Commit
bd5258ff
authored
Sep 19, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that it is possible to request with another software release.
parent
504266f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
148 additions
and
20 deletions
+148
-20
master/product/Vifib/tests/testVifibSlapComputerPartitionRequest.py
...duct/Vifib/tests/testVifibSlapComputerPartitionRequest.py
+52
-20
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
+96
-0
No files found.
master/product/Vifib/tests/testVifibSlapComputerPartitionRequest.py
View file @
bd5258ff
...
...
@@ -1512,23 +1512,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
portal_type
=
"Slave Instance"
).
getUid
()
sequence
.
edit
(
software_instance_uid
=
slave_instance_uid
)
def
stepRequestComputerPartitionWithAnotherSoftwareType
(
self
,
sequence
,
**
kw
):
self
.
slap
=
slap
.
slap
()
self
.
slap
.
initializeConnection
(
self
.
server_url
,
timeout
=
None
)
slap_computer_partition
=
self
.
slap
.
registerComputerPartition
(
sequence
[
'computer_reference'
],
sequence
[
'computer_partition_reference'
])
kw
=
dict
(
software_release
=
sequence
[
'software_release_uri'
],
software_type
=
"SecondSoftwareType"
,
partition_reference
=
sequence
.
get
(
'requested_reference'
,
'requested_reference'
),
partition_parameter_kw
=
sequence
.
get
(
'requested_parameter_dict'
,
{}),
filter_kw
=
sequence
.
get
(
'requested_filter_dict'
,
{}),
state
=
sequence
.
get
(
'instance_state'
))
slap_computer_partition
.
request
(
**
kw
)
def
stepCheckRequestComputerPartitionWithAnotherSoftwareType
(
def
stepCheckRequestComputerPartitionWithAnotherSoftwareRelease
(
self
,
sequence
,
**
kw
):
self
.
slap
=
slap
.
slap
()
self
.
slap
.
initializeConnection
(
self
.
server_url
,
timeout
=
None
)
...
...
@@ -1536,7 +1520,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence
[
'computer_reference'
],
sequence
[
'computer_partition_reference'
])
kw
=
dict
(
software_release
=
sequence
[
'software_release_uri'
],
software_type
=
"SecondSoftwareType"
,
software_type
=
sequence
.
get
(
'requested_software_type'
,
'software_type'
)
,
partition_reference
=
sequence
.
get
(
'requested_reference'
,
'requested_reference'
),
partition_parameter_kw
=
sequence
.
get
(
'requested_parameter_dict'
,
{}),
...
...
@@ -1547,8 +1531,8 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
self
.
assertEquals
(
sequence
.
get
(
'requested_computer_partition_reference'
),
requested_slap_computer_partition
.
getId
())
self
.
assertEquals
(
"SecondSoftwareType"
,
requested_slap_computer_partition
.
getInstanceParameterDict
()[
'slap_software_type'
]
)
self
.
assertEquals
(
sequence
[
'software_release_uri'
]
,
requested_slap_computer_partition
.
getSoftwareRelease
().
getURI
()
)
self
.
assertEquals
(
1
,
requested_slap_computer_partition
.
_need_modification
)
...
...
@@ -1591,6 +1575,54 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_ComputerPartition_request_changeSoftwareRelease
(
self
):
"""
Check that requesting the same instance with a different software release
does not create a new instance
"""
self
.
computer_partition_amount
=
3
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_install_requested_computer_partition_sequence_string
+
'
\
SelectRequestedReference
\
SelectEmptyRequestedParameterDict
\
\
SlapLoginCurrentSoftwareInstance
\
RequestComputerPartition
\
Tic
\
LoginDefaultUser
\
CallConfirmOrderedSaleOrderAlarm
\
Tic
\
Logout
\
RequestComputerPartition
\
Tic '
+
self
.
prepare_published_software_release
+
'
\
LoginTestVifibAdmin
\
RequestSoftwareInstallation
\
Tic
\
Logout
\
\
SlapLoginCurrentComputer
\
ComputerSoftwareReleaseAvailable
\
Tic
\
SlapLogout
\
\
RequestComputerPartition
\
Tic
\
RequestComputerPartition
\
Tic
\
LoginDefaultUser
\
CallConfirmOrderedSaleOrderAlarm
\
Tic
\
Logout
\
CheckRequestComputerPartitionWithAnotherSoftwareRelease
\
Tic
\
SlapLogout
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestVifibSlapComputerPartitionRequest
))
...
...
master/product/Vifib/tests/testVifibSlapOpenOrderRequest.py
View file @
bd5258ff
...
...
@@ -225,6 +225,39 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
self
.
assertEquals
(
1
,
requested_slap_computer_partition
.
_need_modification
)
def
stepPersonRequestSlapSoftwareInstanceWithAnotherSoftwareRelease
(
self
,
sequence
,
**
kw
):
software_release
=
sequence
[
'another_software_release_uri'
]
self
.
slap
=
slap
.
slap
()
self
.
slap
.
initializeConnection
(
self
.
server_url
,
timeout
=
None
)
open_order
=
self
.
slap
.
registerOpenOrder
()
open_order
.
request
(
software_release
=
software_release
,
software_type
=
sequence
.
get
(
'requested_software_type'
,
'software_type'
),
partition_reference
=
sequence
[
'requested_reference'
],
partition_parameter_kw
=
sequence
.
get
(
'requested_parameter_dict'
,
{}),
filter_kw
=
sequence
.
get
(
'requested_filter_dict'
,
{}))
def
stepCheckPersonRequestSlapSoftwareInstanceWithAnotherSoftwareRelease
(
self
,
sequence
,
**
kw
):
software_release
=
sequence
[
'another_software_release_uri'
]
self
.
slap
=
slap
.
slap
()
self
.
slap
.
initializeConnection
(
self
.
server_url
,
timeout
=
None
)
open_order
=
self
.
slap
.
registerOpenOrder
()
requested_slap_computer_partition
=
open_order
.
request
(
software_release
=
software_release
,
software_type
=
sequence
.
get
(
'requested_software_type'
,
'software_type'
),
partition_reference
=
sequence
[
'requested_reference'
],
partition_parameter_kw
=
sequence
.
get
(
'requested_parameter_dict'
,
{}),
filter_kw
=
sequence
.
get
(
'requested_filter_dict'
,
{}))
self
.
assertEquals
(
sequence
.
get
(
'requested_computer_partition_reference'
),
requested_slap_computer_partition
.
getId
())
self
.
assertEquals
(
software_release
,
requested_slap_computer_partition
.
getSoftwareRelease
().
getURI
())
self
.
assertEquals
(
1
,
requested_slap_computer_partition
.
_need_modification
)
def
test_OpenOrder_request_changeSoftwareType
(
self
):
"""
Check that requesting the same instance with a different software type
...
...
@@ -272,6 +305,69 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
stepStoreAnotherSoftwareRelease
(
self
,
sequence
,
**
kw
):
sequence
[
'another_software_release_uri'
]
=
sequence
[
'software_release_uri'
]
def
test_OpenOrder_request_changeSoftwareRelease
(
self
):
"""
Check that requesting the same instance with a different software release
does not create a new instance
"""
self
.
computer_partition_amount
=
1
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
"""
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable
Tic
SlapLogout
StoreAnotherSoftwareRelease
"""
+
self
.
prepare_published_software_release
+
\
"""
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable
Tic
SlapLogout
SetRandomRequestedReference
SlapLoginTestVifibCustomer
SetFirstSoftwareType
PersonRequestSlapSoftwareInstancePrepare
Tic
SlapLogout
LoginDefaultUser
CallConfirmOrderedSaleOrderAlarm
Tic
Logout
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstance
Tic
PersonRequestSlapSoftwareInstanceWithAnotherSoftwareRelease
Tic
CheckPersonRequestSlapSoftwareInstanceWithAnotherSoftwareRelease
Tic
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestVifibSlapOpenOrderRequest
))
...
...
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