Commit b8d75fd0 authored by Philip ABBET's avatar Philip ABBET
Browse files

Add a test for the execution of an algorithm with both local and remote inputs

parent ab2cd768
{
"algorithm": "user/sum/1",
"channel": "main",
"inputs": {
"a": {
"database": "integers_db/1",
"protocol": "double",
"set": "double",
"output": "a",
"channel": "main"
},
"b": {
"hash": "abcdef0123456789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"channel": "main"
}
},
"outputs": {
"sum": {
"channel": "main"
}
},
"parameters": {
},
"environment": {
"name": "environment",
"version": "1"
}
}
......@@ -204,6 +204,23 @@ def test_execute_algorithm_using_cached_files():
nose.tools.eq_(call('execute', instructions, cache=tmp_prefix), 0)
@slow
@nose.tools.with_setup(teardown=cleanup)
def test_execute_algorithm_using_database_and_cached_files():
instructions_dir = os.path.join(os.path.dirname(__file__), 'instructions')
cache_dir = os.path.join(tmp_prefix, 'ab', 'cd', 'ef')
os.makedirs(cache_dir)
shutil.copy(os.path.join(instructions_dir, '0123456789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.0.9.data'), cache_dir)
shutil.copy(os.path.join(instructions_dir, '0123456789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.0.9.data.checksum'), cache_dir)
shutil.copy(os.path.join(instructions_dir, '0123456789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.0.9.index'), cache_dir)
shutil.copy(os.path.join(instructions_dir, '0123456789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.0.9.index.checksum'), cache_dir)
instructions = os.path.join(instructions_dir, 'algo_using_database_and_cached_files.json')
nose.tools.eq_(call('execute', instructions, cache=tmp_prefix), 0)
@slow
@nose.tools.with_setup(teardown=cleanup)
def test_execute_analyzer():
......
File mode changed from 100755 to 100644
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment