Skip to content
Snippets Groups Projects
Commit 6ac27581 authored by Alexander Kreft's avatar Alexander Kreft
Browse files

TST: Test retrieve and download File by ID

parent 1bb82dec
No related branches found
No related tags found
1 merge request!4F full ak
Pipeline #12618 failed
......@@ -23,6 +23,7 @@
using Test
using Logging
using UUIDs
# first try and load a local CaosDB installation; if that fails,
# set-up CaosDB.jl with repo and branch specified in
# `CaosDBIntegrationTests`. The latter is mainly useful for running
......@@ -193,4 +194,27 @@ end
end
@testset "Test retrieve and download File by ID" begin
#a file TestFile is needed on the server!
ent_with_name = execute_query("FIND TestFile")
path = string(pwd(), "/", string(uuid4()))
single_insert_transaction = create_transaction()
add_retrieve_and_download_file_by_id(
single_insert_transaction,
get_id(ent_with_name[1]),
path,
)
execute(single_insert_transaction)
results = get_results(single_insert_transaction)
@test length(results) == 1
@test has_errors(results[1]) == false
@test get_id(results[1]) != ""
@test isfile(path) == true
#cleanup
rm(path)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment