Externalize premium/reserved list tests

Remove the GoogleInternal designator on the premium/reserved list tests, move
the lists themselves under the config/files directory, and fix all of the
surrounding infrastructure.

The lists do not get exported.  Only the "example.txt" list does, allowing the
test to function on the open source build.

TESTED:
  Verified that the gradle build works and that only the example.txt file is exported.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=229940659
This commit is contained in:
mmuller 2019-01-18 09:24:32 -08:00 committed by Ben McIlwain
parent d3e25cd5b1
commit 87ab149049
6 changed files with 46 additions and 0 deletions

View file

@ -31,6 +31,9 @@ reconstruct a premium list .txt file from the premium list that is loaded into
Datastore (though in principle it would be easy to do by writing a tool to do
so), so don't lose those .txt files.
An example premium list can be found at
`java/google/registry/model/registry/config/files/premium/example.txt`.
## Creating a premium list
Once the file containing the premium prices is ready, run the

View file

@ -0,0 +1,10 @@
licenses(["notice"]) # Apache 2.0
package(
default_visibility = ["//java/google/registry:registry_project"],
)
filegroup(
name = "all_lists",
srcs = glob(["*.txt"]),
)

View file

@ -0,0 +1,7 @@
# Example of a reserved list file. This is simply a CSV file with two
# columns: sub-domain name and price (specified as currency type and value).
#
# These are manipulated using the "nomulus" tool
# {create,update,delete,list}_premium_list commands.
foo,USD 100 # comment after the item
bar,JPY 14

View file

@ -0,0 +1,10 @@
licenses(["notice"]) # Apache 2.0
package(
default_visibility = ["//java/google/registry:registry_project"],
)
filegroup(
name = "all_lists",
srcs = glob(["**/*.txt"]),
)

View file

@ -0,0 +1,14 @@
# Example of a reserved list file. This is simply a CSV file with 2-3
# columns: sub-domain name and reservation type and (in the case of the
# NAMESERVER_RESTRICTED type) a colon-separated list of nameservers. See
# java/google/registry/model/registry/label/ReserverationType for the complete
# set of reservation types.
#
# These are manipulated using the "nomulus" tool
# {create,update,delete,list}_reserved_list commands.
nsrestric,NAMESERVER_RESTRICTED,foo.example.com:bar.example.com
sunrise,ALLOWED_IN_SUNRISE
specific,RESERVED_FOR_SPECIFIC_USE
anchor,RESERVED_FOR_ANCHOR_TENANT
collision,NAME_COLLISION
blocked,FULLY_BLOCKED # Comment after the line.

View file

@ -16,6 +16,8 @@ java_library(
"**/*.java",
]),
resources = [
"//java/google/registry/config/files/premium:all_lists",
"//java/google/registry/config/files/reserved:all_lists",
] + glob(["**/testdata/*"]),
deps = [
"//java/google/registry/config",