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
e22e994e
Commit
e22e994e
authored
Jun 15, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check SLA in case of Person request.
parent
cc6577e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
27 deletions
+99
-27
master/product/Vifib/tests/testVifibSlapWebService.py
master/product/Vifib/tests/testVifibSlapWebService.py
+99
-27
No files found.
master/product/Vifib/tests/testVifibSlapWebService.py
View file @
e22e994e
...
@@ -4116,12 +4116,6 @@ class TestVifibSlapWebService(testVifibMixin):
...
@@ -4116,12 +4116,6 @@ class TestVifibSlapWebService(testVifibMixin):
sequence
[
'requested_filter_dict'
]
=
dict
(
sequence
[
'requested_filter_dict'
]
=
dict
(
computer_guid
=
sequence
[
'computer_reference'
])
computer_guid
=
sequence
[
'computer_reference'
])
def
test_ComputerPartition_request_filter_computer_guid
(
self
):
"""
Check that requesting with filter computer_guid key works as expected
"""
self
.
computer_partition_amount
=
2
sequence_list
=
SequenceList
()
prepare_another_computer_sequence_string
=
"""
prepare_another_computer_sequence_string
=
"""
StoreComputerReference
StoreComputerReference
LoginTestVifibAdmin
LoginTestVifibAdmin
...
@@ -4132,7 +4126,7 @@ class TestVifibSlapWebService(testVifibMixin):
...
@@ -4132,7 +4126,7 @@ class TestVifibSlapWebService(testVifibMixin):
SlapLoginCurrentComputer
SlapLoginCurrentComputer
FormatComputer
FormatComputer
Tic
Tic
SlapLogout"""
+
self
.
prepare_software_release_confirmed_packing_list
+
"""
SlapLogout"""
+
prepare_software_release_confirmed_packing_list
+
"""
LoginTestVifibAdmin
LoginTestVifibAdmin
RequestSoftwareInstallation
RequestSoftwareInstallation
...
@@ -4147,12 +4141,19 @@ class TestVifibSlapWebService(testVifibMixin):
...
@@ -4147,12 +4141,19 @@ class TestVifibSlapWebService(testVifibMixin):
SetRequestedFilterParameterDict
SetRequestedFilterParameterDict
RestoreComputerReference
RestoreComputerReference
"""
"""
def
test_ComputerPartition_request_filter_computer_guid
(
self
):
"""
Check that requesting with filter computer_guid key works as expected
"""
self
.
computer_partition_amount
=
2
sequence_list
=
SequenceList
()
# There are two partitions on another computer
# There are two partitions on another computer
# so request shall be processed twice correctly, 3rd time it shall
# so request shall be processed twice correctly, 3rd time it shall
# fail
# fail
sequence_string
=
\
sequence_string
=
\
self
.
prepare_install_requested_computer_partition_sequence_string
+
\
self
.
prepare_install_requested_computer_partition_sequence_string
+
\
prepare_another_computer_sequence_string
+
'
\
self
.
prepare_another_computer_sequence_string
+
'
\
SlapLoginCurrentSoftwareInstance
\
SlapLoginCurrentSoftwareInstance
\
RequestComputerPartitionNotReadyResponse
\
RequestComputerPartitionNotReadyResponse
\
Tic
\
Tic
\
...
@@ -7009,6 +7010,21 @@ class TestVifibSlapWebService(testVifibMixin):
...
@@ -7009,6 +7010,21 @@ class TestVifibSlapWebService(testVifibMixin):
fails"""
fails"""
raise
NotImplementedError
raise
NotImplementedError
def
stepPersonRequestSlapSoftwareInstanceNotFoundResponse
(
self
,
sequence
,
**
kw
):
software_release
=
sequence
[
'software_release_uri'
]
self
.
slap
=
slap
.
slap
()
self
.
slap
.
initializeConnection
(
self
.
server_url
)
open_order
=
self
.
slap
.
registerOpenOrder
()
self
.
assertRaises
(
slap
.
ResourceNotFound
,
open_order
.
request
,
software_release
=
software_release
,
software_type
=
sequence
.
get
(
'software_type'
,
'software_type'
),
partition_reference
=
sequence
.
get
(
'requested_reference'
,
'requested_reference'
),
partition_parameter_kw
=
sequence
.
get
(
'requested_parameter_dict'
,
{}),
filter_kw
=
sequence
.
get
(
'requested_filter_dict'
,
{})
)
def
stepPersonRequestSlapSoftwareInstanceNotReadyResponse
(
self
,
sequence
,
def
stepPersonRequestSlapSoftwareInstanceNotReadyResponse
(
self
,
sequence
,
**
kw
):
**
kw
):
software_release
=
sequence
[
'software_release_uri'
]
software_release
=
sequence
[
'software_release_uri'
]
...
@@ -7116,7 +7132,63 @@ class TestVifibSlapWebService(testVifibMixin):
...
@@ -7116,7 +7132,63 @@ class TestVifibSlapWebService(testVifibMixin):
def
test_person_request_ComputerPartition_filter_computer_guid
(
self
):
def
test_person_request_ComputerPartition_filter_computer_guid
(
self
):
"""Check that requesting with computer_guid in filter_kw works as
"""Check that requesting with computer_guid in filter_kw works as
expected in case of person request"""
expected in case of person request"""
raise
NotImplementedError
self
.
computer_partition_amount
=
1
sequence_list
=
SequenceList
()
# There is only one partition on each computer, which has installed
# software release. But as request has sla parameter, the partition
# on another computer is not selected, as not following SLA.
sequence_string
=
self
.
prepare_published_software_release
+
\
self
.
prepare_formated_computer
+
"""
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SlapLoginCurrentComputer
ComputerSoftwareReleaseAvailable
Tic
SlapLogout
"""
+
\
self
.
prepare_another_computer_sequence_string
+
"""
LoginTestVifibAdmin
RequestSoftwareInstallation
Tic
Logout
SetRandomRequestedReference
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstanceNotReadyResponse
Tic
SlapLogout
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstanceNotReadyResponse
Tic
SlapLogout
LoginDefaultUser
ConfirmOrderedSaleOrderActiveSense
Tic
Logout
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstance
Tic
SlapLogout
LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance
CheckPersonRequestedSoftwareInstanceAndRelatedComputerPartition
Logout
SelectYetAnotherRequestedReference
SlapLoginTestVifibCustomer
PersonRequestSlapSoftwareInstanceNotFoundResponse
Tic
SlapLogout
"""
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
########################################
########################################
# Bug related tests
# Bug related tests
...
...
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