Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
File Transfer Service
fts-rest
Commits
53205ce4
Commit
53205ce4
authored
Feb 07, 2017
by
Alejandro Alvarez Ayllon
Browse files
FTS-704
: Test to catch regression introduced
If reuse is set to false for a multiple replica, it is a no-op
parent
a6ff2ada
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/fts3rest/fts3rest/tests/functional/test_multiple.py
View file @
53205ce4
...
...
@@ -154,6 +154,40 @@ class TestMultiple(TestController):
uniq_hashes
=
set
(
map
(
lambda
f
:
f
.
hashed_id
,
db_job
.
files
))
self
.
assertEqual
(
len
(
uniq_hashes
),
1
)
def
test_submit_with_alternatives3
(
self
):
"""
Same as before, but reuse is set explicitly to False, which should be a no-op
(Regression bug)
"""
self
.
setup_gridsite_environment
()
self
.
push_delegation
()
job
=
{
'files'
:
[
{
'sources'
:
[
'http://source.es/file'
,
'http://source.fr/file'
],
'destinations'
:
[
'http://dest.ch/file'
],
'selection_strategy'
:
'orderly'
,
'checksum'
:
'adler32:1234'
,
'filesize'
:
1024
,
'activity'
:
'something something'
,
'metadata'
:
{
'mykey'
:
'myvalue'
},
}
],
'params'
:
{
'reuse'
:
False
}
}
answer
=
self
.
app
.
post
(
url
=
"/jobs"
,
content_type
=
'application/json'
,
params
=
json
.
dumps
(
job
),
status
=
200
)
# Validate job in the database
job_id
=
json
.
loads
(
answer
.
body
)[
'job_id'
]
db_job
=
Session
.
query
(
Job
).
get
(
job_id
)
self
.
assertEqual
(
db_job
.
job_type
,
'R'
)
def
test_submit_multiple_transfers
(
self
):
"""
Submit one job with multiple independent transfers
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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