Read from bloom filter for premium pricing checks

This also cleans up the PremiumList API so that it only has one
method for checking premium prices, which is by TLD, rather than two.

I will be refactoring a lot of the static methods currently residing in
the PremiumList class into a separate utils class, but I don't want to
include too many changes in this one CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148475345
This commit is contained in:
mcilwain 2017-02-24 10:32:23 -08:00 committed by Ben McIlwain
parent 3ac74fa449
commit 3ca9bb6aeb
18 changed files with 328 additions and 282 deletions

View file

@ -17,7 +17,6 @@ package google.registry.tools.server;
import static google.registry.testing.DatastoreHelper.persistPremiumList;
import com.google.common.base.Optional;
import google.registry.model.registry.label.PremiumList;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -35,10 +34,6 @@ public class ListPremiumListsActionTest extends ListActionTestCase {
public void init() throws Exception {
persistPremiumList("xn--q9jyb4c", "rich,USD 100");
persistPremiumList("how", "richer,JPY 5000");
PremiumList.get("how").get().asBuilder()
.setDescription("foobar")
.build()
.saveAndUpdateEntries();
action = new ListPremiumListsAction();
}