Export registered domains to drive folder

The export happens in a reducer, whois instance fields all need to be serializable. The DriveConnection is therefore installed as a class variable that can be replaced with a mock during test. Class variables are not serialized. Only fields related to a particular instance are.

Note that DriveConnection is a misnomer. It is not a connection at all. It is just a thin wrapper class around the Drive service class, which provides convenient methods to write into Drive. Regardless, it cannot be serialized.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194596695
This commit is contained in:
jianglai 2018-04-27 14:49:30 -07:00
parent c242a4d08f
commit ebce333d5b
4 changed files with 127 additions and 28 deletions

View file

@ -16,6 +16,7 @@ java_library(
"//java/google/registry/mapreduce/inputs",
"//java/google/registry/model",
"//java/google/registry/request",
"//java/google/registry/request:modules",
"//java/google/registry/request/auth",
"//java/google/registry/storage/drive",
"//java/google/registry/util",