Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AIG-public
Cobalt
Commits
929c3d7f
Commit
929c3d7f
authored
Jul 03, 2017
by
Paul Rich
Browse files
Actually entering a bad-integer pass test.
This can happen from some of the XMLRPC calls.
parent
bedcb951
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/TestCobalt/TestComponents/test_cray.py
View file @
929c3d7f
...
...
@@ -1050,3 +1050,18 @@ class TestCraySystem(object):
assert_match
(
info
,
None
,
'Bad reservation info returned'
,
is_match
)
assert_match
(
len
(
self
.
system
.
alps_reservations
.
keys
()),
0
,
"Wrong number of entries."
)
TestCraySystem
.
verify_alps_reservation_dict
(
self
.
system
)
@
patch
(
'Cobalt.Components.system.CraySystem.ALPSBridge.reserve'
,
fake_alps_reserve
)
@
patch
.
object
(
time
,
'time'
,
return_value
=
500.000
)
def
test__ALPS_reserve_resources_bad_int_pass
(
self
,
*
args
,
**
kwargs
):
'''CraySystem._ALPS_reserve_resources: Force integer to string key'''
job
=
{
'user'
:
'frodo'
,
'jobid'
:
1
,
'nodes'
:
5
,
'attrs'
:
{},
}
node_id_list
=
[
str
(
i
)
for
i
in
xrange
(
1
,
6
)]
new_time
=
600.0
info
=
self
.
system
.
_ALPS_reserve_resources
(
job
,
new_time
,
node_id_list
)
assert_match
(
info
,
node_id_list
,
'Bad reservation info returned'
)
TestCraySystem
.
verify_alps_reservation_dict
(
self
.
system
)
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