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
Łukasz Nowak
slapos.core
Commits
83048c9c
Commit
83048c9c
authored
Mar 27, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test Software Release Cleanup resource basic functionality.
parent
1dcd2438
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
157 additions
and
0 deletions
+157
-0
master/product/Vifib/tests/testVifibSlapComputerGetSoftwareReleaseList.py
...ifib/tests/testVifibSlapComputerGetSoftwareReleaseList.py
+119
-0
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+38
-0
No files found.
master/product/Vifib/tests/testVifibSlapComputerGetSoftwareReleaseList.py
View file @
83048c9c
...
...
@@ -221,6 +221,125 @@ class TestVifibSlapComputerGetSoftwareReleaseList(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_Computer_getSoftwareReleaseList_CleanupResource_ConfirmedState
(
self
):
"""
Check that calling Computer.getSoftwareReleaseList works in
delivered state with the setup resource
"""
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
\
self
.
prepare_software_release_cleanup_confirmed_packing_list
+
'
\
SlapLoginCurrentComputer
\
CheckSuccessComputerGetSoftwareReleaseListCall
\
CheckDestroyedStateGetSoftwareReleaseListCall
\
SlapLogout
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_Computer_getSoftwareReleaseList_CleanupResource_StartedState
(
self
):
"""
Check that calling Computer.getSoftwareReleaseList works in
delivered state with the setup resource
"""
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
\
self
.
prepare_software_release_cleanup_confirmed_packing_list
+
'
\
LoginDefaultUser
\
StartPurchasePackingList
\
Tic
\
Logout
\
SlapLoginCurrentComputer
\
CheckSuccessComputerGetSoftwareReleaseListCall
\
CheckDestroyedStateGetSoftwareReleaseListCall
\
SlapLogout
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_Computer_getSoftwareReleaseList_CleanupResource_StoppedState
(
self
):
"""
Check that calling Computer.getSoftwareReleaseList works in
delivered state with the setup resource
"""
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
\
self
.
prepare_software_release_cleanup_confirmed_packing_list
+
'
\
LoginDefaultUser
\
StartPurchasePackingList
\
Tic
\
StopPurchasePackingList
\
Tic
\
Logout
\
SlapLoginCurrentComputer
\
CheckEmptyComputerGetSoftwareReleaseListCall
\
SlapLogout
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_Computer_getSoftwareReleaseList_CleanupResource_DeliveredState
(
self
):
"""
Check that calling Computer.getSoftwareReleaseList works in
delivered state with the setup resource
"""
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
\
self
.
prepare_software_release_cleanup_confirmed_packing_list
+
'
\
LoginDefaultUser
\
StartPurchasePackingList
\
Tic
\
StopPurchasePackingList
\
Tic
\
DeliverPurchasePackingList
\
Tic
\
Logout
\
SlapLoginCurrentComputer
\
CheckEmptyComputerGetSoftwareReleaseListCall
\
SlapLogout
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_Computer_getSoftwareReleaseList_CleanupResource_CancelledState
(
self
):
"""
Check that calling Computer.getSoftwareReleaseList works in
delivered state with the setup resource
"""
sequence_list
=
SequenceList
()
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
\
self
.
prepare_software_release_cleanup_confirmed_packing_list
+
'
\
LoginDefaultUser
\
CancelPurchasePackingList
\
Tic
\
Logout
\
SlapLoginCurrentComputer
\
CheckEmptyComputerGetSoftwareReleaseListCall
\
SlapLogout
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_Computer_getSoftwareReleaseList_AccountingResource_ConfirmedState
(
self
):
"""
Check that calling Computer.getSoftwareReleaseList works in
...
...
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
83048c9c
...
...
@@ -998,6 +998,20 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Logout
"""
prepare_software_release_cleanup_confirmed_packing_list
=
"""
LoginDefaultUser
CreatePurchasePackingList
Tic
CreatePurchasePackingListLine
Tic
SetPurchasePackingListLineCleanupResource
SetPurchasePackingListLineAggregate
ConfirmPurchasePackingList
Tic
CheckConfirmedPurchasePackingList
Logout
"""
prepare_software_release_purchase_packing_list
=
\
prepare_published_software_release
+
prepare_formated_computer
+
\
prepare_software_release_confirmed_packing_list
...
...
@@ -2328,6 +2342,19 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer
=
self
.
slap
.
registerComputer
(
computer_guid
)
self
.
assertEquals
([],
computer
.
getSoftwareReleaseList
())
def
stepCheckDestroyedStateGetSoftwareReleaseListCall
(
self
,
sequence
,
**
kw
):
"""
Check that Computer.getSoftwareReleaseList returns software release
associated to the computer.
"""
computer_guid
=
sequence
[
"computer_reference"
]
self
.
slap
=
slap
.
slap
()
self
.
slap
.
initializeConnection
(
self
.
server_url
,
timeout
=
None
)
computer
=
self
.
slap
.
registerComputer
(
computer_guid
)
self
.
assertEquals
(
1
,
len
(
computer
.
getSoftwareReleaseList
()))
software_release
=
computer
.
getSoftwareReleaseList
()[
0
]
self
.
assertEqual
(
'destroyed'
,
software_release
.
getState
())
def
stepCheckSuccessComputerGetSoftwareReleaseListCall
(
self
,
sequence
,
**
kw
):
"""
Check that Computer.getSoftwareReleaseList returns software release
...
...
@@ -3493,6 +3520,17 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
resource
=
self
.
portal
.
portal_preferences
.
\
getPreferredSoftwareSetupResource
())
def
stepSetPurchasePackingListLineCleanupResource
(
self
,
sequence
,
**
kw
):
"""
Associate the setup service to the purchase packing list line.
"""
line
=
self
.
portal
.
portal_catalog
.
getResultValue
(
uid
=
sequence
[
"purchase_packing_list_line_uid"
])
line
.
edit
(
quantity
=
1
,
resource
=
self
.
portal
.
portal_preferences
.
\
getPreferredSoftwareCleanupResource
())
def
stepSetAccountingBeforeSetupStartDate
(
self
,
sequence
,
**
kw
):
"""
Set date on Purchase Packing List Line
...
...
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