mirror of
https://github.com/google/nomulus.git
synced 2025-08-16 06:24:07 +02:00
Add DEFAULT_PROMO token type (#1832)
* Add DEFAULT_PROMO token type * Fix test error message check
This commit is contained in:
parent
5905147388
commit
49b53b2bab
2 changed files with 8 additions and 5 deletions
|
@ -109,13 +109,15 @@ public class AllocationToken extends BackupGroupRoot implements Buildable {
|
||||||
ANCHOR_TENANT
|
ANCHOR_TENANT
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Type of the token that indicates how and where it should be used. */
|
||||||
* Single-use tokens are invalid after use. Infinite-use tokens, predictably, are not. Package
|
|
||||||
* tokens are used in package promotions.
|
|
||||||
*/
|
|
||||||
public enum TokenType {
|
public enum TokenType {
|
||||||
|
/** Token saved on a TLD to use if no other token is passed from the client */
|
||||||
|
DEFAULT_PROMO,
|
||||||
|
/** Token used for package pricing */
|
||||||
PACKAGE,
|
PACKAGE,
|
||||||
|
/** Invalid after use */
|
||||||
SINGLE_USE,
|
SINGLE_USE,
|
||||||
|
/** Do not expire after use */
|
||||||
UNLIMITED_USE,
|
UNLIMITED_USE,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -403,7 +403,8 @@ class GenerateAllocationTokensCommandTest extends CommandTestCase<GenerateAlloca
|
||||||
assertThat(thrown)
|
assertThat(thrown)
|
||||||
.hasMessageThat()
|
.hasMessageThat()
|
||||||
.isEqualTo(
|
.isEqualTo(
|
||||||
"Invalid value for -t parameter. Allowed values:[PACKAGE, SINGLE_USE, UNLIMITED_USE]");
|
"Invalid value for -t parameter. Allowed values:[DEFAULT_PROMO, PACKAGE, SINGLE_USE,"
|
||||||
|
+ " UNLIMITED_USE]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue