mirror of
https://github.com/google/nomulus
synced 2026-02-10 06:50:30 +00:00
Don't delete or "redeem" unlimited use AllocationTokens
We haven't started dealing with timing or discounts yet, but unlimited use tokens should actually be unlimited use ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=243318266
This commit is contained in:
@@ -23,6 +23,7 @@ import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import com.beust.jcommander.ParameterException;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.domain.token.AllocationToken;
|
||||
import google.registry.model.domain.token.AllocationToken.TokenType;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import java.util.Collection;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -109,6 +110,18 @@ public class DeleteAllocationTokensCommandTest
|
||||
.containsExactly(preRed1, preRed2, preDom2, othrRed, othrNot);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSkipUnlimitedUseTokens() throws Exception {
|
||||
AllocationToken unlimitedUseToken =
|
||||
persistResource(
|
||||
new AllocationToken.Builder()
|
||||
.setToken("prefixasdfg897as")
|
||||
.setTokenType(TokenType.UNLIMITED_USE)
|
||||
.build());
|
||||
runCommandForced("--prefix", "prefix");
|
||||
assertThat(reloadTokens(unlimitedUseToken)).containsExactly(unlimitedUseToken);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_batching() throws Exception {
|
||||
for (int i = 0; i < 50; i++) {
|
||||
|
||||
Reference in New Issue
Block a user