Skip to content

Commit

Permalink
rebasing on master and adding a testset statement
Browse files Browse the repository at this point in the history
  • Loading branch information
nlw0 committed Jun 6, 2023
1 parent d6f99ab commit 5fd90dd
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions test/nocredentials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ using Test
using GoogleCloud
using JSON

creds = NoCredentials()
@testset "NoCredentials" begin
creds = NoCredentials()

session = GoogleSession(creds, ["devstorage.full_control"])
bucketName = "atari-replay-datasets"
fileList = GoogleCloud.storage(:Object, :list, bucketName; prefix="dqn/Pong/1/replay_logs/\$store\$_action", session=session) |> IOBuffer |> JSON.parse
session = GoogleSession(creds, ["devstorage.full_control"])
bucketName = "atari-replay-datasets"
fileList = GoogleCloud.storage(:Object, :list, bucketName; prefix="dqn/Pong/1/replay_logs/\$store\$_action", session=session) |> IOBuffer |> JSON.parse

parities = map(fileList["items"]) do item
reduce(, GoogleCloud.storage(:Object, :get, bucketName, item["name"], session=session))
end
parities = map(fileList["items"]) do item
reduce(, GoogleCloud.storage(:Object, :get, bucketName, item["name"], session=session))
end

@test reduce(, fetch.(parities)) == 0xf1
@test reduce(, fetch.(parities)) == 0xf1
end

0 comments on commit 5fd90dd

Please sign in to comment.