mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 12:07:51 +02:00
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:
parent
d3e25cd5b1
commit
87ab149049
6 changed files with 46 additions and 0 deletions
|
@ -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
|
Datastore (though in principle it would be easy to do by writing a tool to do
|
||||||
so), so don't lose those .txt files.
|
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
|
## Creating a premium list
|
||||||
|
|
||||||
Once the file containing the premium prices is ready, run the
|
Once the file containing the premium prices is ready, run the
|
||||||
|
|
10
java/google/registry/config/files/premium/BUILD
Normal file
10
java/google/registry/config/files/premium/BUILD
Normal 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"]),
|
||||||
|
)
|
7
java/google/registry/config/files/premium/example.txt
Normal file
7
java/google/registry/config/files/premium/example.txt
Normal 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
|
10
java/google/registry/config/files/reserved/BUILD
Normal file
10
java/google/registry/config/files/reserved/BUILD
Normal 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"]),
|
||||||
|
)
|
|
@ -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.
|
|
@ -16,6 +16,8 @@ java_library(
|
||||||
"**/*.java",
|
"**/*.java",
|
||||||
]),
|
]),
|
||||||
resources = [
|
resources = [
|
||||||
|
"//java/google/registry/config/files/premium:all_lists",
|
||||||
|
"//java/google/registry/config/files/reserved:all_lists",
|
||||||
] + glob(["**/testdata/*"]),
|
] + glob(["**/testdata/*"]),
|
||||||
deps = [
|
deps = [
|
||||||
"//java/google/registry/config",
|
"//java/google/registry/config",
|
||||||
|
|
Loading…
Add table
Reference in a new issue