From d6f99ab99811e61e59961ec8e64e18af667c0849 Mon Sep 17 00:00:00 2001 From: Nicolau Leal Werneck Date: Sun, 24 Jul 2022 11:55:53 +0200 Subject: [PATCH] test for nocredentials --- test/nocredentials.jl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/nocredentials.jl diff --git a/test/nocredentials.jl b/test/nocredentials.jl new file mode 100644 index 0000000..e359d54 --- /dev/null +++ b/test/nocredentials.jl @@ -0,0 +1,16 @@ +using Test + +using GoogleCloud +using JSON + +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 + +parities = map(fileList["items"]) do item + reduce(⊻, GoogleCloud.storage(:Object, :get, bucketName, item["name"], session=session)) +end + +@test reduce(⊻, fetch.(parities)) == 0xf1