Skip to content

Commit

Permalink
remove data writing in file
Browse files Browse the repository at this point in the history
  • Loading branch information
ctroupin committed Dec 9, 2024
1 parent 4e27163 commit 9f43b75
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions test/test_CORA_Timeseries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@
@info(query);
@info(outputfile);

@time open(outputfile, "w") do io
r = HTTP.request("POST", joinpath(beacon_services[datasource], "api/query"),
["Content-type"=> "application/json",
"Authorization" => "Bearer $(APItoken)"
],
query,
response_stream=io);
@test r.status == 200
end
#@time open(outputfile, "w") do io
r = HTTP.request("POST", joinpath(beacon_services[datasource], "api/query"),
["Content-type"=> "application/json",
"Authorization" => "Bearer $(APItoken)"
],
query);
@test r.status == 200
# end

NCDataset(outputfile) do nc
@test length(nc["TEMP"][:]) == 50
@test sort(nc["TEMP"][:])[10] == 10.319f0
@test sort(nc["TIME"][:])[end] == DateTime(1990, 11, 12, 0, 12, 1)
@test sort(nc["LONGITUDE"][:])[1] == 13.3494
@test sort(nc["dataset_id"][:])[5] == 19931
end
# NCDataset(outputfile) do nc
# @test length(nc["TEMP"][:]) == 50
# @test sort(nc["TEMP"][:])[10] == 10.319f0
# @test sort(nc["TIME"][:])[end] == DateTime(1990, 11, 12, 0, 12, 1)
# @test sort(nc["LONGITUDE"][:])[1] == 13.3494
# @test sort(nc["dataset_id"][:])[5] == 19931
# end
end

0 comments on commit 9f43b75

Please sign in to comment.