mirror of
https://github.com/google/nomulus
synced 2026-07-10 01:56:49 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f988d42c7 | |||
| 9b47a6cfee | |||
| 9db4d1a082 | |||
| ec22d4d1a0 | |||
| 0fcf26def0 | |||
| 3d88ba4e1b | |||
| 580a3b6981 | |||
| 6990d6058f | |||
| dfeed63c40 | |||
| 9eac9621cb | |||
| b7efc5dd25 |
@@ -862,6 +862,8 @@ task standardTest(type: FilteringTest) {
|
||||
includeAllTests()
|
||||
exclude fragileTestPatterns
|
||||
exclude outcastTestPatterns
|
||||
// See SqlIntegrationTestSuite.java
|
||||
exclude '**/*BeforeSuiteTest.*', '**/*AfterSuiteTest.*'
|
||||
|
||||
if (rootProject.findProperty("skipDockerIncompatibleTests") == "true") {
|
||||
exclude dockerIncompatibleTestPatterns
|
||||
@@ -894,11 +896,14 @@ createUberJar('nomulus', 'nomulus', 'google.registry.tools.RegistryTool')
|
||||
|
||||
// A jar with classes and resources from main sourceSet, excluding internal
|
||||
// data. See comments on configurations.nomulus_test above for details.
|
||||
// TODO(weiminyu): release process should build this using the public repo to eliminate the need
|
||||
// for excludes.
|
||||
task nomulusFossJar (type: Jar) {
|
||||
archiveBaseName = 'nomulus'
|
||||
archiveClassifier = 'public'
|
||||
from (project.sourceSets.main.output) {
|
||||
exclude 'google/registry/config/files/**'
|
||||
exclude 'google/registry/proxy/config/**'
|
||||
}
|
||||
from (project.sourceSets.main.output) {
|
||||
include 'google/registry/config/files/default-config.yaml'
|
||||
|
||||
@@ -19,6 +19,7 @@ import static com.google.common.base.Strings.emptyToNull;
|
||||
import static google.registry.util.DomainNameUtils.canonicalizeDomainName;
|
||||
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
|
||||
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import com.googlecode.objectify.annotation.Id;
|
||||
import google.registry.model.Buildable.GenericBuilder;
|
||||
import google.registry.model.ImmutableObject;
|
||||
@@ -83,6 +84,13 @@ public abstract class DomainLabelEntry<T extends Comparable<?>, D extends Domain
|
||||
"Label '%s' must be in puny-coded, lower-case form",
|
||||
getInstance().label);
|
||||
checkArgumentNotNull(getInstance().getValue(), "Value must be specified");
|
||||
// Verify that the label creates a valid SLD if we add a TLD to the end of it.
|
||||
// We require that the label is not already a full domain name including a dot.
|
||||
// Domain name validation is tricky, so let InternetDomainName handle it for us.
|
||||
checkArgument(
|
||||
InternetDomainName.from(getInstance().label + ".tld").parts().size() == 2,
|
||||
"Label %s must not be a multi-level domain name",
|
||||
getInstance().label);
|
||||
return super.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
// Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.persistence;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Stream;
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.PostLoad;
|
||||
import javax.persistence.PostPersist;
|
||||
import javax.persistence.PostRemove;
|
||||
import javax.persistence.PostUpdate;
|
||||
import javax.persistence.PrePersist;
|
||||
import javax.persistence.PreRemove;
|
||||
import javax.persistence.PreUpdate;
|
||||
|
||||
/**
|
||||
* A listener class to invoke entity callbacks in cases where Hibernate doesn't invoke the callback
|
||||
* as expected.
|
||||
*
|
||||
* <p>JPA defines a few annotations, e.g. {@link PostLoad}, that we can use for the application to
|
||||
* react to certain events that occur inside the persistence mechanism. However, Hibernate only
|
||||
* supports a few basic use cases, e.g. defining a {@link PostLoad} method directly in an {@link
|
||||
* javax.persistence.Entity} class or in an {@link Embeddable} class. If the annotated method is
|
||||
* defined in an {@link Embeddable} class that is a property of another {@link Embeddable} class, or
|
||||
* it is defined in a parent class of the {@link Embeddable} class, Hibernate doesn't invoke it.
|
||||
*
|
||||
* <p>This listener is added in core/src/main/resources/META-INF/orm.xml as a default entity
|
||||
* listener whose annotated methods will be invoked by Hibernate when corresponding events happen.
|
||||
* For example, {@link EntityCallbacksListener#prePersist} will be invoked before the entity is
|
||||
* persisted to the database, then it will recursively invoke any other {@link PrePersist} method
|
||||
* that should be invoked but not handled by Hibernate due to the bug.
|
||||
*
|
||||
* @see <a
|
||||
* href="https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#events-jpa-callbacks">JPA
|
||||
* Callbacks</a>
|
||||
* @see <a href="https://hibernate.atlassian.net/browse/HHH-13316">HHH-13316</a>
|
||||
*/
|
||||
public class EntityCallbacksListener {
|
||||
|
||||
@PrePersist
|
||||
void prePersist(Object entity) {
|
||||
EntityCallbackExecutor.create(PrePersist.class).execute(entity, entity.getClass());
|
||||
}
|
||||
|
||||
@PreRemove
|
||||
void preRemove(Object entity) {
|
||||
EntityCallbackExecutor.create(PreRemove.class).execute(entity, entity.getClass());
|
||||
}
|
||||
|
||||
@PostPersist
|
||||
void postPersist(Object entity) {
|
||||
EntityCallbackExecutor.create(PostPersist.class).execute(entity, entity.getClass());
|
||||
}
|
||||
|
||||
@PostRemove
|
||||
void postRemove(Object entity) {
|
||||
EntityCallbackExecutor.create(PostRemove.class).execute(entity, entity.getClass());
|
||||
}
|
||||
|
||||
@PreUpdate
|
||||
void preUpdate(Object entity) {
|
||||
EntityCallbackExecutor.create(PreUpdate.class).execute(entity, entity.getClass());
|
||||
}
|
||||
|
||||
@PostUpdate
|
||||
void postUpdate(Object entity) {
|
||||
EntityCallbackExecutor.create(PostUpdate.class).execute(entity, entity.getClass());
|
||||
}
|
||||
|
||||
@PostLoad
|
||||
void postLoad(Object entity) {
|
||||
EntityCallbackExecutor.create(PostLoad.class).execute(entity, entity.getClass());
|
||||
}
|
||||
|
||||
private static class EntityCallbackExecutor {
|
||||
Class<? extends Annotation> callbackType;
|
||||
|
||||
private EntityCallbackExecutor(Class<? extends Annotation> callbackType) {
|
||||
this.callbackType = callbackType;
|
||||
}
|
||||
|
||||
private static EntityCallbackExecutor create(Class<? extends Annotation> callbackType) {
|
||||
return new EntityCallbackExecutor(callbackType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes eligible callbacks in {@link Embedded} properties recursively.
|
||||
*
|
||||
* @param entity the Java object of the entity class
|
||||
* @param entityType either the type of the entity or an ancestor type
|
||||
*/
|
||||
private void execute(Object entity, Class<?> entityType) {
|
||||
Class<?> parentType = entityType.getSuperclass();
|
||||
if (parentType != null && parentType.isAnnotationPresent(MappedSuperclass.class)) {
|
||||
execute(entity, parentType);
|
||||
}
|
||||
|
||||
findEmbeddedProperties(entity, entityType)
|
||||
.forEach(
|
||||
normalEmbedded -> {
|
||||
// For each normal embedded property, we don't execute its callback method because
|
||||
// it is handled by Hibernate. However, for the embedded property defined in the
|
||||
// entity's parent class, we need to treat it as a nested embedded property and
|
||||
// invoke its callback function.
|
||||
if (entity.getClass().equals(entityType)) {
|
||||
executeCallbackForNormalEmbeddedProperty(
|
||||
normalEmbedded, normalEmbedded.getClass());
|
||||
} else {
|
||||
executeCallbackForNestedEmbeddedProperty(
|
||||
normalEmbedded, normalEmbedded.getClass());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void executeCallbackForNestedEmbeddedProperty(
|
||||
Object nestedEmbeddedObject, Class<?> nestedEmbeddedType) {
|
||||
Class<?> parentType = nestedEmbeddedType.getSuperclass();
|
||||
if (parentType != null && parentType.isAnnotationPresent(MappedSuperclass.class)) {
|
||||
executeCallbackForNestedEmbeddedProperty(nestedEmbeddedObject, parentType);
|
||||
}
|
||||
|
||||
findEmbeddedProperties(nestedEmbeddedObject, nestedEmbeddedType)
|
||||
.forEach(
|
||||
embeddedProperty ->
|
||||
executeCallbackForNestedEmbeddedProperty(
|
||||
embeddedProperty, embeddedProperty.getClass()));
|
||||
|
||||
for (Method method : nestedEmbeddedType.getDeclaredMethods()) {
|
||||
if (method.isAnnotationPresent(callbackType)) {
|
||||
invokeMethod(method, nestedEmbeddedObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void executeCallbackForNormalEmbeddedProperty(
|
||||
Object normalEmbeddedObject, Class<?> normalEmbeddedType) {
|
||||
Class<?> parentType = normalEmbeddedType.getSuperclass();
|
||||
if (parentType != null && parentType.isAnnotationPresent(MappedSuperclass.class)) {
|
||||
executeCallbackForNormalEmbeddedProperty(normalEmbeddedObject, parentType);
|
||||
}
|
||||
|
||||
findEmbeddedProperties(normalEmbeddedObject, normalEmbeddedType)
|
||||
.forEach(
|
||||
embeddedProperty ->
|
||||
executeCallbackForNestedEmbeddedProperty(
|
||||
embeddedProperty, embeddedProperty.getClass()));
|
||||
}
|
||||
|
||||
private Stream<Object> findEmbeddedProperties(Object object, Class<?> clazz) {
|
||||
return Arrays.stream(clazz.getDeclaredFields())
|
||||
.filter(
|
||||
field ->
|
||||
field.isAnnotationPresent(Embedded.class)
|
||||
|| field.getType().isAnnotationPresent(Embeddable.class))
|
||||
.map(field -> getFieldObject(field, object))
|
||||
.filter(Objects::nonNull);
|
||||
}
|
||||
|
||||
private static Object getFieldObject(Field field, Object object) {
|
||||
field.setAccessible(true);
|
||||
try {
|
||||
return field.get(object);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void invokeMethod(Method method, Object object) {
|
||||
method.setAccessible(true);
|
||||
try {
|
||||
method.invoke(object);
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.persistence.converter;
|
||||
|
||||
import google.registry.persistence.VKey;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.persistence.AttributeConverter;
|
||||
|
||||
/**
|
||||
* Converts VKey to a string column.
|
||||
*/
|
||||
public abstract class VKeyConverter<T> implements AttributeConverter<VKey<T>, String> {
|
||||
@Override
|
||||
@Nullable
|
||||
public String convertToDatabaseColumn(@Nullable VKey<T> attribute) {
|
||||
return attribute == null ? null : (String) attribute.getSqlKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public VKey<T> convertToEntityAttribute(@Nullable String dbData) {
|
||||
return dbData == null ? null : VKey.createSql(getAttributeClass(), dbData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class of the attribute.
|
||||
*/
|
||||
protected abstract Class<T> getAttributeClass();
|
||||
}
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.base.Strings.isNullOrEmpty;
|
||||
|
||||
import com.beust.jcommander.Parameter;
|
||||
import com.beust.jcommander.Parameters;
|
||||
import com.google.common.collect.Multimap;
|
||||
@@ -39,6 +41,11 @@ final class CheckDomainCommand extends NonMutatingEppToolCommand {
|
||||
required = true)
|
||||
private List<String> mainParameters;
|
||||
|
||||
@Parameter(
|
||||
names = {"-t", "--token"},
|
||||
description = "Allocation token to use in the command, if desired")
|
||||
private String allocationToken;
|
||||
|
||||
@Inject
|
||||
@Config("registryAdminClientId")
|
||||
String registryAdminClientId;
|
||||
@@ -53,7 +60,11 @@ final class CheckDomainCommand extends NonMutatingEppToolCommand {
|
||||
Multimap<String, String> domainNameMap = validateAndGroupDomainNamesByTld(mainParameters);
|
||||
for (Collection<String> values : domainNameMap.asMap().values()) {
|
||||
setSoyTemplate(DomainCheckSoyInfo.getInstance(), DomainCheckSoyInfo.DOMAINCHECK);
|
||||
addSoyRecord(clientId, new SoyMapData("domainNames", values));
|
||||
SoyMapData soyMapData = new SoyMapData("domainNames", values);
|
||||
if (!isNullOrEmpty(allocationToken)) {
|
||||
soyMapData.put("allocationToken", allocationToken);
|
||||
}
|
||||
addSoyRecord(clientId, soyMapData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,11 @@
|
||||
<basic name="amount" access="FIELD"/>
|
||||
</attributes>
|
||||
</embeddable>
|
||||
<persistence-unit-metadata>
|
||||
<persistence-unit-defaults>
|
||||
<entity-listeners>
|
||||
<entity-listener class="google.registry.persistence.EntityCallbacksListener" />
|
||||
</entity-listeners>
|
||||
</persistence-unit-defaults>
|
||||
</persistence-unit-metadata>
|
||||
</entity-mappings>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
{template .domaincheck stricthtml="false"}
|
||||
{@param domainNames: list<string>}
|
||||
{@param? allocationToken: string|null}
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
@@ -39,6 +40,12 @@
|
||||
</fee:domain>
|
||||
{/for}
|
||||
</fee:check>
|
||||
{if isNonnull($allocationToken)}
|
||||
<allocationToken:allocationToken
|
||||
xmlns:allocationToken="urn:ietf:params:xml:ns:allocationToken-1.0">
|
||||
{$allocationToken}
|
||||
</allocationToken:allocationToken>
|
||||
{/if}
|
||||
</extension>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
|
||||
@@ -36,6 +36,9 @@ public class DumpGoldenSchemaCommand extends PostgresqlCommand {
|
||||
// The mount point in the container.
|
||||
private static final String CONTAINER_MOUNT_POINT = "/tmp/pg_dump.out";
|
||||
|
||||
// Temporary workaround to fix permission issues on certain Linux distro (e. g. Arch Linux).
|
||||
private static final String CONTAINER_MOUNT_POINT_TMP = "/tmp/pg_dump.tmp";
|
||||
|
||||
@Parameter(
|
||||
names = {"--output", "-o"},
|
||||
description = "Output file",
|
||||
@@ -61,6 +64,11 @@ public class DumpGoldenSchemaCommand extends PostgresqlCommand {
|
||||
if (result.getExitCode() != 0) {
|
||||
throw new RuntimeException(result.toString());
|
||||
}
|
||||
result = postgresContainer.execInContainer(
|
||||
"cp", CONTAINER_MOUNT_POINT_TMP, CONTAINER_MOUNT_POINT);
|
||||
if (result.getExitCode() != 0) {
|
||||
throw new RuntimeException(result.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,7 +87,7 @@ public class DumpGoldenSchemaCommand extends PostgresqlCommand {
|
||||
"-U",
|
||||
username,
|
||||
"-f",
|
||||
CONTAINER_MOUNT_POINT,
|
||||
CONTAINER_MOUNT_POINT_TMP,
|
||||
"--schema-only",
|
||||
"--no-owner",
|
||||
"--no-privileges",
|
||||
|
||||
@@ -42,22 +42,33 @@ import java.util.Set;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Base class of all unit tests for entities which are persisted to Datastore via Objectify. */
|
||||
@RunWith(JUnit4.class)
|
||||
public abstract class EntityTestCase {
|
||||
|
||||
protected FakeClock fakeClock = new FakeClock(DateTime.now(UTC));
|
||||
|
||||
@Rule
|
||||
public final AppEngineRule appEngine =
|
||||
AppEngineRule.builder().withDatastoreAndCloudSql().withClock(fakeClock).build();
|
||||
@Rule @RegisterExtension public final AppEngineRule appEngine;
|
||||
|
||||
@Rule public InjectRule inject = new InjectRule();
|
||||
@Rule @RegisterExtension public InjectRule inject = new InjectRule();
|
||||
|
||||
protected EntityTestCase() {
|
||||
this(false);
|
||||
}
|
||||
|
||||
protected EntityTestCase(boolean enableJpaEntityCheck) {
|
||||
appEngine =
|
||||
AppEngineRule.builder()
|
||||
.withDatastoreAndCloudSql()
|
||||
.enableJpaEntityCoverageCheck(enableJpaEntityCheck)
|
||||
.withClock(fakeClock)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void injectClock() {
|
||||
inject.setStaticField(Ofy.class, "clock", fakeClock);
|
||||
}
|
||||
|
||||
@@ -17,31 +17,45 @@ package google.registry.model.domain;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static org.joda.time.DateTimeZone.UTC;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.EntityTestCase;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DesignatedContact.Type;
|
||||
import google.registry.model.domain.launch.LaunchNotice;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.eppcommon.AuthInfo.PasswordAuth;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageExtension;
|
||||
import google.registry.testing.DatastoreEntityExtension;
|
||||
import google.registry.testing.FakeClock;
|
||||
import javax.persistence.EntityManager;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Verify that we can store/retrieve DomainBase objects from a SQL database. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class DomainBaseSqlTest extends EntityTestCase {
|
||||
public class DomainBaseSqlTest {
|
||||
|
||||
protected FakeClock fakeClock = new FakeClock(DateTime.now(UTC));
|
||||
|
||||
@RegisterExtension
|
||||
@Order(value = 1)
|
||||
DatastoreEntityExtension datastoreEntityExtension = new DatastoreEntityExtension();
|
||||
|
||||
@RegisterExtension
|
||||
JpaIntegrationWithCoverageExtension jpa =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageExtension();
|
||||
|
||||
DomainBase domain;
|
||||
Key<ContactResource> contactKey;
|
||||
Key<ContactResource> contact2Key;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
contactKey = Key.create(ContactResource.class, "contact_id1");
|
||||
contact2Key = Key.create(ContactResource.class, "contact_id2");
|
||||
|
||||
@@ -31,20 +31,21 @@ import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.FakeClock;
|
||||
import java.util.Optional;
|
||||
import org.joda.time.Duration;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link RegistryLockDao}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public final class RegistryLockDaoTest {
|
||||
|
||||
private final FakeClock fakeClock = new FakeClock();
|
||||
|
||||
@Rule
|
||||
@RegisterExtension
|
||||
public final AppEngineRule appEngine =
|
||||
AppEngineRule.builder().withDatastoreAndCloudSql().withClock(fakeClock).build();
|
||||
AppEngineRule.builder()
|
||||
.withDatastoreAndCloudSql()
|
||||
.enableJpaEntityCoverageCheck(true)
|
||||
.withClock(fakeClock)
|
||||
.build();
|
||||
|
||||
@Test
|
||||
public void testSaveAndLoad_success() {
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
// Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.persistence;
|
||||
|
||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule;
|
||||
import java.lang.reflect.Method;
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.PostLoad;
|
||||
import javax.persistence.PostPersist;
|
||||
import javax.persistence.PostRemove;
|
||||
import javax.persistence.PostUpdate;
|
||||
import javax.persistence.PrePersist;
|
||||
import javax.persistence.PreRemove;
|
||||
import javax.persistence.PreUpdate;
|
||||
import javax.persistence.Transient;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Unit tests for {@link EntityCallbacksListener}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class EntityCallbacksListenerTest {
|
||||
|
||||
@Rule
|
||||
public final JpaUnitTestRule jpaRule =
|
||||
new JpaTestRules.Builder().withEntityClass(TestEntity.class).buildUnitTestRule();
|
||||
|
||||
@Test
|
||||
public void verifyAllCallbacks_executedExpectedTimes() {
|
||||
TestEntity testPersist = new TestEntity();
|
||||
jpaTm().transact(() -> jpaTm().saveNew(testPersist));
|
||||
checkAll(testPersist, 1, 0, 0, 0);
|
||||
|
||||
TestEntity testUpdate = new TestEntity();
|
||||
TestEntity updated =
|
||||
jpaTm()
|
||||
.transact(
|
||||
() -> {
|
||||
TestEntity merged = jpaTm().getEntityManager().merge(testUpdate);
|
||||
merged.foo++;
|
||||
jpaTm().getEntityManager().flush();
|
||||
return merged;
|
||||
});
|
||||
// Note that when we get the merged entity, its @PostLoad callbacks are also invoked
|
||||
checkAll(updated, 0, 1, 0, 1);
|
||||
|
||||
TestEntity testLoad =
|
||||
jpaTm().transact(() -> jpaTm().load(VKey.createSql(TestEntity.class, "id"))).get();
|
||||
checkAll(testLoad, 0, 0, 0, 1);
|
||||
|
||||
TestEntity testRemove =
|
||||
jpaTm()
|
||||
.transact(
|
||||
() -> {
|
||||
TestEntity removed = jpaTm().load(VKey.createSql(TestEntity.class, "id")).get();
|
||||
jpaTm().getEntityManager().remove(removed);
|
||||
return removed;
|
||||
});
|
||||
checkAll(testRemove, 0, 0, 1, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void verifyAllManagedEntities_haveNoMethodWithEmbedded() {
|
||||
ImmutableSet<Class> violations =
|
||||
PersistenceXmlUtility.getManagedClasses().stream()
|
||||
.filter(clazz -> clazz.isAnnotationPresent(Entity.class))
|
||||
.filter(EntityCallbacksListenerTest::hasMethodAnnotatedWithEmbedded)
|
||||
.collect(toImmutableSet());
|
||||
assertWithMessage(
|
||||
"Found entity classes having methods annotated with @Embedded. EntityCallbacksListener"
|
||||
+ " only supports annotating fields with @Embedded.")
|
||||
.that(violations)
|
||||
.isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void verifyHasMethodAnnotatedWithEmbedded_work() {
|
||||
assertThat(hasMethodAnnotatedWithEmbedded(ViolationEntity.class)).isTrue();
|
||||
}
|
||||
|
||||
private static boolean hasMethodAnnotatedWithEmbedded(Class<?> entityType) {
|
||||
boolean result = false;
|
||||
Class<?> parentType = entityType.getSuperclass();
|
||||
if (parentType != null && parentType.isAnnotationPresent(MappedSuperclass.class)) {
|
||||
result = hasMethodAnnotatedWithEmbedded(parentType);
|
||||
}
|
||||
for (Method method : entityType.getDeclaredMethods()) {
|
||||
if (method.isAnnotationPresent(Embedded.class)) {
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void checkAll(
|
||||
TestEntity testEntity,
|
||||
int expectedPersist,
|
||||
int expectedUpdate,
|
||||
int expectedRemove,
|
||||
int expectedLoad) {
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedNested.entityEmbeddedNestedPostPersist)
|
||||
.isEqualTo(expectedPersist);
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedNested.entityEmbeddedNestedPrePersist)
|
||||
.isEqualTo(expectedPersist);
|
||||
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedNested.entityEmbeddedNestedPreUpdate)
|
||||
.isEqualTo(expectedUpdate);
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedNested.entityEmbeddedNestedPostUpdate)
|
||||
.isEqualTo(expectedUpdate);
|
||||
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedNested.entityEmbeddedNestedPreRemove)
|
||||
.isEqualTo(expectedRemove);
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedNested.entityEmbeddedNestedPostRemove)
|
||||
.isEqualTo(expectedRemove);
|
||||
|
||||
assertThat(testEntity.entityPostLoad).isEqualTo(expectedLoad);
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedPostLoad).isEqualTo(expectedLoad);
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedNested.entityEmbeddedNestedPostLoad)
|
||||
.isEqualTo(expectedLoad);
|
||||
assertThat(testEntity.entityEmbedded.entityEmbeddedParentPostLoad).isEqualTo(expectedLoad);
|
||||
|
||||
assertThat(testEntity.parentPostLoad).isEqualTo(expectedLoad);
|
||||
assertThat(testEntity.parentEmbedded.parentEmbeddedPostLoad).isEqualTo(expectedLoad);
|
||||
assertThat(testEntity.parentEmbedded.parentEmbeddedNested.parentEmbeddedNestedPostLoad)
|
||||
.isEqualTo(expectedLoad);
|
||||
assertThat(testEntity.parentEmbedded.parentEmbeddedParentPostLoad).isEqualTo(expectedLoad);
|
||||
}
|
||||
|
||||
@Entity(name = "TestEntity")
|
||||
private static class TestEntity extends ParentEntity {
|
||||
@Id String name = "id";
|
||||
int foo = 0;
|
||||
|
||||
@Transient int entityPostLoad = 0;
|
||||
|
||||
@Embedded EntityEmbedded entityEmbedded = new EntityEmbedded();
|
||||
|
||||
@PostLoad
|
||||
void entityPostLoad() {
|
||||
entityPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@Embeddable
|
||||
private static class EntityEmbedded extends EntityEmbeddedParent {
|
||||
@Embedded EntityEmbeddedNested entityEmbeddedNested = new EntityEmbeddedNested();
|
||||
|
||||
@Transient int entityEmbeddedPostLoad = 0;
|
||||
|
||||
String entityEmbedded = "placeholder";
|
||||
|
||||
@PostLoad
|
||||
void entityEmbeddedPrePersist() {
|
||||
entityEmbeddedPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@MappedSuperclass
|
||||
private static class EntityEmbeddedParent {
|
||||
@Transient int entityEmbeddedParentPostLoad = 0;
|
||||
|
||||
String entityEmbeddedParent = "placeholder";
|
||||
|
||||
@PostLoad
|
||||
void entityEmbeddedParentPostLoad() {
|
||||
entityEmbeddedParentPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@Embeddable
|
||||
private static class EntityEmbeddedNested {
|
||||
@Transient int entityEmbeddedNestedPrePersist = 0;
|
||||
@Transient int entityEmbeddedNestedPreRemove = 0;
|
||||
@Transient int entityEmbeddedNestedPostPersist = 0;
|
||||
@Transient int entityEmbeddedNestedPostRemove = 0;
|
||||
@Transient int entityEmbeddedNestedPreUpdate = 0;
|
||||
@Transient int entityEmbeddedNestedPostUpdate = 0;
|
||||
@Transient int entityEmbeddedNestedPostLoad = 0;
|
||||
|
||||
String entityEmbeddedNested = "placeholder";
|
||||
|
||||
@PrePersist
|
||||
void entityEmbeddedNestedPrePersist() {
|
||||
entityEmbeddedNestedPrePersist++;
|
||||
}
|
||||
|
||||
@PreRemove
|
||||
void entityEmbeddedNestedPreRemove() {
|
||||
entityEmbeddedNestedPreRemove++;
|
||||
}
|
||||
|
||||
@PostPersist
|
||||
void entityEmbeddedNestedPostPersist() {
|
||||
entityEmbeddedNestedPostPersist++;
|
||||
}
|
||||
|
||||
@PostRemove
|
||||
void entityEmbeddedNestedPostRemove() {
|
||||
entityEmbeddedNestedPostRemove++;
|
||||
}
|
||||
|
||||
@PreUpdate
|
||||
void entityEmbeddedNestedPreUpdate() {
|
||||
entityEmbeddedNestedPreUpdate++;
|
||||
}
|
||||
|
||||
@PostUpdate
|
||||
void entityEmbeddedNestedPostUpdate() {
|
||||
entityEmbeddedNestedPostUpdate++;
|
||||
}
|
||||
|
||||
@PostLoad
|
||||
void entityEmbeddedNestedPostLoad() {
|
||||
entityEmbeddedNestedPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@MappedSuperclass
|
||||
private static class ParentEntity {
|
||||
@Embedded ParentEmbedded parentEmbedded = new ParentEmbedded();
|
||||
@Transient int parentPostLoad = 0;
|
||||
|
||||
String parentEntity = "placeholder";
|
||||
|
||||
@PostLoad
|
||||
void parentPostLoad() {
|
||||
parentPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@Embeddable
|
||||
private static class ParentEmbedded extends ParentEmbeddedParent {
|
||||
@Transient int parentEmbeddedPostLoad = 0;
|
||||
|
||||
String parentEmbedded = "placeholder";
|
||||
|
||||
@Embedded ParentEmbeddedNested parentEmbeddedNested = new ParentEmbeddedNested();
|
||||
|
||||
@PostLoad
|
||||
void parentEmbeddedPostLoad() {
|
||||
parentEmbeddedPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@Embeddable
|
||||
private static class ParentEmbeddedNested {
|
||||
@Transient int parentEmbeddedNestedPostLoad = 0;
|
||||
|
||||
String parentEmbeddedNested = "placeholder";
|
||||
|
||||
@PostLoad
|
||||
void parentEmbeddedNestedPostLoad() {
|
||||
parentEmbeddedNestedPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@MappedSuperclass
|
||||
private static class ParentEmbeddedParent {
|
||||
@Transient int parentEmbeddedParentPostLoad = 0;
|
||||
|
||||
String parentEmbeddedParent = "placeholder";
|
||||
|
||||
@PostLoad
|
||||
void parentEmbeddedParentPostLoad() {
|
||||
parentEmbeddedParentPostLoad++;
|
||||
}
|
||||
}
|
||||
|
||||
@Entity
|
||||
private static class ViolationEntity {
|
||||
|
||||
@Embedded
|
||||
EntityEmbedded getEntityEmbedded() {
|
||||
return new EntityEmbedded();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
// Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.persistence.converter;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
|
||||
|
||||
import google.registry.persistence.VKey;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaUnitTestRule;
|
||||
import javax.persistence.Convert;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Test SQL persistence of VKey. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class VKeyConverterTest {
|
||||
|
||||
@Rule
|
||||
public final JpaUnitTestRule jpaRule =
|
||||
new JpaTestRules.Builder().withEntityClass(TestEntity.class).buildUnitTestRule();
|
||||
|
||||
public VKeyConverterTest() {}
|
||||
|
||||
@Test
|
||||
public void testRoundTrip() {
|
||||
TestEntity original =
|
||||
new TestEntity("TheRealSpartacus", VKey.createSql(TestEntity.class, "ImSpartacus!"));
|
||||
jpaTm().transact(() -> jpaTm().getEntityManager().persist(original));
|
||||
|
||||
TestEntity retrieved =
|
||||
jpaTm().transact(
|
||||
() -> jpaTm().getEntityManager().find(TestEntity.class, "TheRealSpartacus"));
|
||||
assertThat(retrieved.other.getSqlKey()).isEqualTo("ImSpartacus!");
|
||||
}
|
||||
|
||||
static class TestEntityVKeyConverter extends VKeyConverter<TestEntity> {
|
||||
|
||||
@Override
|
||||
protected Class<TestEntity> getAttributeClass() {
|
||||
return TestEntity.class;
|
||||
}
|
||||
}
|
||||
|
||||
@Entity(name = "TestEntity")
|
||||
static class TestEntity {
|
||||
@Id
|
||||
String id;
|
||||
|
||||
// Specifying "@Converter(autoApply = true) on TestEntityVKeyConverter this doesn't seem to
|
||||
// work.
|
||||
@Convert(converter = TestEntityVKeyConverter.class)
|
||||
VKey<TestEntity> other;
|
||||
|
||||
TestEntity(String id, VKey<TestEntity> other) {
|
||||
this.id = id;
|
||||
this.other = other;
|
||||
}
|
||||
|
||||
/** Default constructor, needed for hibernate. */
|
||||
public TestEntity() {}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,11 @@ public class CursorDaoTest {
|
||||
|
||||
@RegisterExtension
|
||||
public final AppEngineRule appEngine =
|
||||
AppEngineRule.builder().withDatastoreAndCloudSql().withClock(fakeClock).build();
|
||||
AppEngineRule.builder()
|
||||
.withDatastoreAndCloudSql()
|
||||
.enableJpaEntityCoverageCheck(true)
|
||||
.withClock(fakeClock)
|
||||
.build();
|
||||
|
||||
@Test
|
||||
public void save_worksSuccessfullyOnNewCursor() {
|
||||
|
||||
+57
-11
@@ -14,19 +14,22 @@
|
||||
|
||||
package google.registry.schema.integration;
|
||||
|
||||
import com.google.common.truth.Expect;
|
||||
import static com.google.common.truth.Truth.assert_;
|
||||
|
||||
import google.registry.model.domain.DomainBaseSqlTest;
|
||||
import google.registry.model.registry.RegistryLockDaoTest;
|
||||
import google.registry.persistence.transaction.JpaEntityCoverage;
|
||||
import google.registry.schema.cursor.CursorDaoTest;
|
||||
import google.registry.schema.integration.SqlIntegrationTestSuite.AfterSuiteTest;
|
||||
import google.registry.schema.integration.SqlIntegrationTestSuite.BeforeSuiteTest;
|
||||
import google.registry.schema.registrar.RegistrarDaoTest;
|
||||
import google.registry.schema.server.LockDaoTest;
|
||||
import google.registry.schema.tld.PremiumListDaoTest;
|
||||
import google.registry.schema.tld.ReservedListDaoTest;
|
||||
import google.registry.schema.tmch.ClaimsListDaoTest;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.platform.suite.api.SelectClasses;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -47,9 +50,23 @@ import org.junit.runner.RunWith;
|
||||
* <p>Note that with {@code JpaIntegrationWithCoverageRule}, each method starts with an empty
|
||||
* database. Therefore this is not the right place for verifying backward data compatibility in
|
||||
* end-to-end functional tests.
|
||||
*
|
||||
* <p>As of April 2020, none of the before/after annotations ({@code BeforeClass} and {@code
|
||||
* AfterClass} in JUnit 4, or {@code BeforeAll} and {@code AfterAll} in JUnit5) work in a test suite
|
||||
* run with {@link JUnitPlatform the current JUnit 5 runner}. However, staying with the JUnit 4
|
||||
* runner would prevent any member tests from migrating to JUnit 5.
|
||||
*
|
||||
* <p>This class uses a hack to work with the current JUnit 5 runner. {@link BeforeSuiteTest} is
|
||||
* added to the front of the suite class list and invokes the suite's setup method, and {@link
|
||||
* AfterSuiteTest} is added to the tail of the suite class list and invokes the suite's teardown
|
||||
* method. This works because the member tests are run in the order they are declared (See {@code
|
||||
* org.junit.platform.engine.support.descriptor.AbstractTestDescriptor#addChild}). Should the
|
||||
* ordering changes in the future, we will only get false alarms.
|
||||
*/
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@SelectClasses({
|
||||
// BeforeSuiteTest must be the first entry. See class javadoc for details.
|
||||
BeforeSuiteTest.class,
|
||||
ClaimsListDaoTest.class,
|
||||
CursorDaoTest.class,
|
||||
DomainBaseSqlTest.class,
|
||||
@@ -57,27 +74,56 @@ import org.junit.runner.RunWith;
|
||||
PremiumListDaoTest.class,
|
||||
RegistrarDaoTest.class,
|
||||
RegistryLockDaoTest.class,
|
||||
ReservedListDaoTest.class
|
||||
ReservedListDaoTest.class,
|
||||
// AfterSuiteTest must be the last entry. See class javadoc for details.
|
||||
AfterSuiteTest.class
|
||||
})
|
||||
public class SqlIntegrationTestSuite {
|
||||
|
||||
@ClassRule public static final Expect expect = Expect.create();
|
||||
|
||||
@BeforeClass
|
||||
@BeforeAll // Not yet supported in JUnit 5. Called through BeforeSuiteTest.
|
||||
public static void initJpaEntityCoverage() {
|
||||
JpaEntityCoverage.init();
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
@AfterAll // Not yet supported in JUnit 5. Called through AfterSuiteTest.
|
||||
public static void checkJpaEntityCoverage() {
|
||||
expect
|
||||
// TODO(weiminyu): collect both assertion errors like Truth's Expect does in JUnit 4.
|
||||
assert_()
|
||||
.withMessage("Tests are missing for the following JPA entities:")
|
||||
.that(JpaEntityCoverage.getUncoveredEntities())
|
||||
.isEmpty();
|
||||
expect
|
||||
assert_()
|
||||
.withMessage(
|
||||
"The following classes do not test JPA entities. Please remove them from this suite")
|
||||
.that(JpaEntityCoverage.getIrrelevantTestClasses())
|
||||
.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hack for calling {@link SqlIntegrationTestSuite#initJpaEntityCoverage()} before all real tests
|
||||
* in suite. See outer class javadoc for details.
|
||||
*
|
||||
* <p>The 'Test' suffix in class name is required.
|
||||
*/
|
||||
static class BeforeSuiteTest {
|
||||
|
||||
@Test
|
||||
void beforeAll() {
|
||||
initJpaEntityCoverage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hack for invoking {@link SqlIntegrationTestSuite#checkJpaEntityCoverage()} after all real tests
|
||||
* in suite. See outer class javadoc for details.
|
||||
*
|
||||
* <p>The 'Test' suffix in class name is required.
|
||||
*/
|
||||
static class AfterSuiteTest {
|
||||
|
||||
@Test
|
||||
void afterSuite() {
|
||||
checkJpaEntityCoverage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,27 +16,41 @@ package google.registry.schema.registrar;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
|
||||
import static org.joda.time.DateTimeZone.UTC;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import google.registry.model.EntityTestCase;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registrar.RegistrarAddress;
|
||||
import google.registry.persistence.VKey;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageExtension;
|
||||
import google.registry.testing.DatastoreEntityExtension;
|
||||
import google.registry.testing.FakeClock;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link RegistrarDao}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class RegistrarDaoTest extends EntityTestCase {
|
||||
/** Unit tests for persisting {@link Registrar} entities. */
|
||||
public class RegistrarDaoTest {
|
||||
|
||||
protected FakeClock fakeClock = new FakeClock(DateTime.now(UTC));
|
||||
|
||||
@RegisterExtension
|
||||
@Order(value = 1)
|
||||
DatastoreEntityExtension datastoreEntityExtension = new DatastoreEntityExtension();
|
||||
|
||||
@RegisterExtension
|
||||
JpaIntegrationWithCoverageExtension jpa =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageExtension();
|
||||
|
||||
private final VKey<Registrar> registrarKey = VKey.createSql(Registrar.class, "registrarId");
|
||||
|
||||
private Registrar testRegistrar;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
testRegistrar =
|
||||
new Registrar.Builder()
|
||||
|
||||
@@ -19,28 +19,25 @@ import static google.registry.testing.LogsSubject.assertAboutLogs;
|
||||
|
||||
import com.google.common.testing.TestLogHandler;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageRule;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageExtension;
|
||||
import google.registry.testing.FakeClock;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.joda.time.Duration;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link Lock}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class LockDaoTest {
|
||||
|
||||
private final FakeClock fakeClock = new FakeClock();
|
||||
private final TestLogHandler logHandler = new TestLogHandler();
|
||||
private final Logger loggerToIntercept = Logger.getLogger(LockDao.class.getCanonicalName());
|
||||
|
||||
@Rule
|
||||
public final JpaIntegrationWithCoverageRule jpaRule =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageRule();
|
||||
@RegisterExtension
|
||||
public final JpaIntegrationWithCoverageExtension jpa =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageExtension();
|
||||
|
||||
@Test
|
||||
public void save_worksSuccessfully() {
|
||||
|
||||
@@ -34,21 +34,22 @@ import java.math.BigDecimal;
|
||||
import java.util.Optional;
|
||||
import org.joda.money.CurrencyUnit;
|
||||
import org.joda.money.Money;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link PremiumListDao}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class PremiumListDaoTest {
|
||||
|
||||
private final FakeClock fakeClock = new FakeClock();
|
||||
|
||||
@Rule
|
||||
@RegisterExtension
|
||||
public final AppEngineRule appEngine =
|
||||
AppEngineRule.builder().withDatastoreAndCloudSql().withClock(fakeClock).build();
|
||||
AppEngineRule.builder()
|
||||
.withDatastoreAndCloudSql()
|
||||
.enableJpaEntityCoverageCheck(true)
|
||||
.withClock(fakeClock)
|
||||
.build();
|
||||
|
||||
private static final ImmutableMap<String, BigDecimal> TEST_PRICES =
|
||||
ImmutableMap.of(
|
||||
@@ -124,7 +125,7 @@ public class PremiumListDaoTest {
|
||||
|
||||
// TODO(b/147246613): Un-ignore this.
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void update_throwsWhenListDoesntExist() {
|
||||
IllegalArgumentException thrown =
|
||||
assertThrows(
|
||||
|
||||
@@ -20,23 +20,20 @@ import static google.registry.persistence.transaction.TransactionManagerFactory.
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.model.registry.label.ReservationType;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageRule;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageExtension;
|
||||
import google.registry.schema.tld.ReservedList.ReservedEntry;
|
||||
import google.registry.testing.FakeClock;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link ReservedListDao}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class ReservedListDaoTest {
|
||||
|
||||
private final FakeClock fakeClock = new FakeClock();
|
||||
|
||||
@Rule
|
||||
public final JpaIntegrationWithCoverageRule jpaRule =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageRule();
|
||||
@RegisterExtension
|
||||
public final JpaIntegrationWithCoverageExtension jpa =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageExtension();
|
||||
|
||||
private static final ImmutableMap<String, ReservedEntry> TEST_RESERVATIONS =
|
||||
ImmutableMap.of(
|
||||
|
||||
@@ -18,22 +18,19 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageRule;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageExtension;
|
||||
import google.registry.testing.FakeClock;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
/** Unit tests for {@link ClaimsListDao}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class ClaimsListDaoTest {
|
||||
|
||||
private final FakeClock fakeClock = new FakeClock();
|
||||
|
||||
@Rule
|
||||
public final JpaIntegrationWithCoverageRule jpaRule =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageRule();
|
||||
@RegisterExtension
|
||||
public final JpaIntegrationWithCoverageExtension jpa =
|
||||
new JpaTestRules.Builder().withClock(fakeClock).buildIntegrationWithCoverageExtension();
|
||||
|
||||
@Test
|
||||
public void trySave_insertsClaimsListSuccessfully() {
|
||||
|
||||
@@ -41,6 +41,7 @@ import google.registry.model.registrar.Registrar.State;
|
||||
import google.registry.model.registrar.RegistrarAddress;
|
||||
import google.registry.model.registrar.RegistrarContact;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationTestRule;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageExtension;
|
||||
import google.registry.persistence.transaction.JpaTestRules.JpaIntegrationWithCoverageRule;
|
||||
import google.registry.util.Clock;
|
||||
@@ -104,10 +105,19 @@ public final class AppEngineRule extends ExternalResource
|
||||
|
||||
/** A rule-within-a-rule to provide a temporary folder for AppEngineRule's internal temp files. */
|
||||
TemporaryFolder temporaryFolder = new TemporaryFolder();
|
||||
// Sets up a SQL database when running on JUnit 5.
|
||||
/**
|
||||
* Sets up a SQL database when running on JUnit 5. This is for test classes that are not member of
|
||||
* the {@code SqlIntegrationTestSuite}.
|
||||
*/
|
||||
JpaIntegrationTestRule jpaIntegrationTestRule = null;
|
||||
/**
|
||||
* Sets up a SQL database when running on JUnit 5 and records the JPA entities tested by each test
|
||||
* class. This is for {@code SqlIntegrationTestSuite} members.
|
||||
*/
|
||||
JpaIntegrationWithCoverageExtension jpaIntegrationWithCoverageExtension = null;
|
||||
|
||||
private boolean withDatastoreAndCloudSql;
|
||||
private boolean enableJpaEntityCoverageCheck;
|
||||
private boolean withLocalModules;
|
||||
private boolean withTaskQueue;
|
||||
private boolean withUserService;
|
||||
@@ -127,6 +137,14 @@ public final class AppEngineRule extends ExternalResource
|
||||
rule.withDatastoreAndCloudSql = true;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Enables JPA entity coverage check if {@code enabled} is true. This should only be enabled for
|
||||
* members of SqlIntegrationTestSuite.
|
||||
*/
|
||||
public Builder enableJpaEntityCoverageCheck(boolean enabled) {
|
||||
rule.enableJpaEntityCoverageCheck = enabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Turn on the use of local modules. */
|
||||
public Builder withLocalModules() {
|
||||
@@ -164,6 +182,9 @@ public final class AppEngineRule extends ExternalResource
|
||||
}
|
||||
|
||||
public AppEngineRule build() {
|
||||
checkState(
|
||||
!rule.enableJpaEntityCoverageCheck || rule.withDatastoreAndCloudSql,
|
||||
"withJpaEntityCoverageCheck enabled without Cloud SQL");
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
@@ -279,8 +300,13 @@ public final class AppEngineRule extends ExternalResource
|
||||
if (clock != null) {
|
||||
builder.withClock(clock);
|
||||
}
|
||||
jpaIntegrationWithCoverageExtension = builder.buildIntegrationWithCoverageExtension();
|
||||
jpaIntegrationWithCoverageExtension.beforeEach(context);
|
||||
if (enableJpaEntityCoverageCheck) {
|
||||
jpaIntegrationWithCoverageExtension = builder.buildIntegrationWithCoverageExtension();
|
||||
jpaIntegrationWithCoverageExtension.beforeEach(context);
|
||||
} else {
|
||||
jpaIntegrationTestRule = builder.buildIntegrationTestRule();
|
||||
jpaIntegrationTestRule.before();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,9 +314,11 @@ public final class AppEngineRule extends ExternalResource
|
||||
@Override
|
||||
public void afterEach(ExtensionContext context) throws Exception {
|
||||
if (withDatastoreAndCloudSql) {
|
||||
checkState(
|
||||
jpaIntegrationWithCoverageExtension != null, "Null jpaIntegrationWithCoverageExtension");
|
||||
jpaIntegrationWithCoverageExtension.afterEach(context);
|
||||
if (enableJpaEntityCoverageCheck) {
|
||||
jpaIntegrationWithCoverageExtension.afterEach(context);
|
||||
} else {
|
||||
jpaIntegrationTestRule.after();
|
||||
}
|
||||
}
|
||||
after();
|
||||
}
|
||||
@@ -310,7 +338,10 @@ public final class AppEngineRule extends ExternalResource
|
||||
if (clock != null) {
|
||||
builder.withClock(clock);
|
||||
}
|
||||
statement = builder.buildIntegrationWithCoverageRule().apply(base, description);
|
||||
checkState(
|
||||
!enableJpaEntityCoverageCheck,
|
||||
"JUnit4 tests must not enable withJpaEntityCoverageCheck.");
|
||||
statement = builder.buildIntegrationTestRule().apply(base, description);
|
||||
}
|
||||
return super.apply(statement, description);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
// Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package google.registry.testing;
|
||||
|
||||
import com.google.apphosting.api.ApiProxy;
|
||||
import com.google.apphosting.api.ApiProxy.Environment;
|
||||
import java.util.Map;
|
||||
import org.junit.jupiter.api.extension.AfterEachCallback;
|
||||
import org.junit.jupiter.api.extension.BeforeEachCallback;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.testcontainers.shaded.com.google.common.collect.ImmutableMap;
|
||||
|
||||
/**
|
||||
* Allows instantiation of Datastore {@code Entity entities} without the heavyweight {@code
|
||||
* AppEngineRule}.
|
||||
*
|
||||
* <p>When used together with {@code JpaIntegrationWithCoverageExtension}, this extension must be
|
||||
* registered first. For consistency's sake, it is recommended that the field for this extension be
|
||||
* annotated with {@code @org.junit.jupiter.api.Order(value = 1)}. Please refer to {@link
|
||||
* google.registry.model.domain.DomainBaseSqlTest} for example, and to <a
|
||||
* href="https://junit.org/junit5/docs/current/user-guide/#extensions-registration-programmatic">
|
||||
* JUnit 5 User Guide</a> for details of extension ordering.
|
||||
*/
|
||||
public class DatastoreEntityExtension implements BeforeEachCallback, AfterEachCallback {
|
||||
|
||||
private static final Environment PLACEHOLDER_ENV = new PlaceholderEnvironment();
|
||||
|
||||
@Override
|
||||
public void beforeEach(ExtensionContext context) {
|
||||
ApiProxy.setEnvironmentForCurrentThread(PLACEHOLDER_ENV);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterEach(ExtensionContext context) {
|
||||
// Clear the cached instance.
|
||||
ApiProxy.setEnvironmentForCurrentThread(null);
|
||||
}
|
||||
|
||||
private static final class PlaceholderEnvironment implements Environment {
|
||||
|
||||
@Override
|
||||
public String getAppId() {
|
||||
return "PlaceholderAppId";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getAttributes() {
|
||||
return ImmutableMap.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleId() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersionId() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEmail() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLoggedIn() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAdmin() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthDomain() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public String getRequestNamespace() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getRemainingMillis() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import org.junit.jupiter.api.extension.AfterEachCallback;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
/**
|
||||
@@ -44,9 +46,10 @@ import org.junit.rules.ExternalResource;
|
||||
* to be evil; but hopefully one day we'll be able to delete this class and do things
|
||||
* <i>properly</i> with <a href="http://square.github.io/dagger/">Dagger</a> dependency injection.
|
||||
*
|
||||
* <p>You use this class by declaring it as a {@link org.junit.Rule @Rule} field and then
|
||||
* calling {@link #setStaticField} from either your {@link org.junit.Test @Test} or {@link
|
||||
* org.junit.Before @Before} methods. For example:
|
||||
* <p>This class temporarily supports both JUnit4 and JUnit5. You use this class in JUnit4 by
|
||||
* declaring it as a {@link org.junit.Rule @Rule} field and then calling {@link
|
||||
* #setStaticField} from either your {@link org.junit.Test @Test} or {@link org.junit.Before
|
||||
* @Before} methods. For example:
|
||||
*
|
||||
* <pre>
|
||||
* // Doomsday.java
|
||||
@@ -85,7 +88,7 @@ import org.junit.rules.ExternalResource;
|
||||
* @see google.registry.util.NonFinalForTesting
|
||||
* @see org.junit.rules.ExternalResource
|
||||
*/
|
||||
public class InjectRule extends ExternalResource {
|
||||
public class InjectRule extends ExternalResource implements AfterEachCallback {
|
||||
|
||||
private static class Change {
|
||||
private final Field field;
|
||||
@@ -140,6 +143,11 @@ public class InjectRule extends ExternalResource {
|
||||
injected.add(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterEach(ExtensionContext context) throws Exception {
|
||||
after();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void after() {
|
||||
RuntimeException thrown = null;
|
||||
|
||||
@@ -76,6 +76,12 @@ public class CheckDomainCommandTest extends EppToolCommandTestCase<CheckDomainCo
|
||||
eppVerifier.expectDryRun().expectClientId("adminreg").verifySent("domain_check_fee.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_allocationToken_reserved() throws Exception {
|
||||
runCommand("--client=NewRegistrar", "--token=abc123", "example.tld");
|
||||
eppVerifier.expectDryRun().verifySent("domain_check_fee_allocationtoken.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_NoMainParameter() {
|
||||
assertThrows(ParameterException.class, () -> runCommand("--client=NewRegistrar"));
|
||||
|
||||
@@ -18,21 +18,19 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.common.io.Resources;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.DatastoreEntityExtension;
|
||||
import google.registry.tools.LevelDbFileBuilder.Property;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.net.URL;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CompareDbBackupsTest {
|
||||
|
||||
private static final int BASE_ID = 1001;
|
||||
@@ -41,20 +39,22 @@ public class CompareDbBackupsTest {
|
||||
private final ByteArrayOutputStream stdout = new ByteArrayOutputStream();
|
||||
private PrintStream orgStdout;
|
||||
|
||||
@Rule public final TemporaryFolder tempFs = new TemporaryFolder();
|
||||
public final TemporaryFolder tempFs = new TemporaryFolder();
|
||||
|
||||
@Rule
|
||||
public final AppEngineRule appEngine = AppEngineRule.builder().withDatastoreAndCloudSql().build();
|
||||
@RegisterExtension
|
||||
public DatastoreEntityExtension datastoreEntityExtension = new DatastoreEntityExtension();
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
@BeforeEach
|
||||
public void before() throws IOException {
|
||||
orgStdout = System.out;
|
||||
System.setOut(new PrintStream(stdout));
|
||||
tempFs.create();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void after() {
|
||||
System.setOut(orgStdout);
|
||||
tempFs.delete();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+33
-8
@@ -61,18 +61,43 @@ public abstract class CreateOrUpdateReservedListCommandTestCase<
|
||||
|
||||
@Test
|
||||
public void testFailure_fileDoesntExist() {
|
||||
assertThrows(
|
||||
ParameterException.class,
|
||||
() ->
|
||||
runCommandForced(
|
||||
"--name=xn--q9jyb4c-blah", "--input=" + reservedTermsPath + "-nonexistent"));
|
||||
assertThat(
|
||||
assertThrows(
|
||||
ParameterException.class,
|
||||
() ->
|
||||
runCommandForced(
|
||||
"--name=xn--q9jyb4c_common-reserved",
|
||||
"--input=" + reservedTermsPath + "-nonexistent")))
|
||||
.hasMessageThat()
|
||||
.contains("-i not found");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_fileDoesntParse() {
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() -> runCommandForced("--name=xn--q9jyb4c-blork", "--input=" + invalidReservedTermsPath));
|
||||
assertThat(
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() ->
|
||||
runCommandForced(
|
||||
"--name=xn--q9jyb4c_common-reserved",
|
||||
"--input=" + invalidReservedTermsPath)))
|
||||
.hasMessageThat()
|
||||
.contains("No enum constant");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidLabel_includesFullDomainName() throws Exception {
|
||||
Files.asCharSink(new File(invalidReservedTermsPath), UTF_8)
|
||||
.write("example.tld,FULLY_BLOCKED\n\n");
|
||||
assertThat(
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() ->
|
||||
runCommandForced(
|
||||
"--name=xn--q9jyb4c_common-reserved",
|
||||
"--input=" + invalidReservedTermsPath)))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("Label example.tld must not be a multi-level domain name");
|
||||
}
|
||||
|
||||
google.registry.schema.tld.ReservedList createCloudSqlReservedList(
|
||||
|
||||
@@ -26,12 +26,18 @@ import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.model.registry.label.ReservedList;
|
||||
import google.registry.schema.tld.ReservedList.ReservedEntry;
|
||||
import google.registry.schema.tld.ReservedListDao;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/** Unit tests for {@link UpdateReservedListCommand}. */
|
||||
public class UpdateReservedListCommandTest extends
|
||||
CreateOrUpdateReservedListCommandTestCase<UpdateReservedListCommand> {
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
populateInitialReservedListInDatastore(true);
|
||||
}
|
||||
|
||||
private void populateInitialReservedListInDatastore(boolean shouldPublish) {
|
||||
persistResource(
|
||||
new ReservedList.Builder()
|
||||
@@ -63,7 +69,6 @@ public class UpdateReservedListCommandTest extends
|
||||
|
||||
@Test
|
||||
public void testSuccess_lastUpdateTime_updatedCorrectly() throws Exception {
|
||||
populateInitialReservedListInDatastore(true);
|
||||
ReservedList original = ReservedList.get("xn--q9jyb4c_common-reserved").get();
|
||||
runCommandForced("--input=" + reservedTermsPath);
|
||||
ReservedList updated = ReservedList.get("xn--q9jyb4c_common-reserved").get();
|
||||
@@ -90,7 +95,6 @@ public class UpdateReservedListCommandTest extends
|
||||
}
|
||||
|
||||
private void runSuccessfulUpdateTest(String... args) throws Exception {
|
||||
populateInitialReservedListInDatastore(true);
|
||||
runCommandForced(args);
|
||||
assertThat(ReservedList.get("xn--q9jyb4c_common-reserved")).isPresent();
|
||||
ReservedList reservedList = ReservedList.get("xn--q9jyb4c_common-reserved").get();
|
||||
@@ -114,7 +118,6 @@ public class UpdateReservedListCommandTest extends
|
||||
|
||||
@Test
|
||||
public void testSaveToCloudSql_succeeds() throws Exception {
|
||||
populateInitialReservedListInDatastore(true);
|
||||
populateInitialReservedListInCloudSql(true);
|
||||
runCommandForced("--name=xn--q9jyb4c_common-reserved", "--input=" + reservedTermsPath);
|
||||
verifyXnq9jyb4cInDatastore();
|
||||
@@ -126,7 +129,6 @@ public class UpdateReservedListCommandTest extends
|
||||
// Note that, during the dual-write phase, we always save the reserved list to Cloud SQL without
|
||||
// checking if there is a list with same name. This is to backfill the existing list in Cloud
|
||||
// Datastore when we update it.
|
||||
populateInitialReservedListInDatastore(true);
|
||||
runCommandForced("--name=xn--q9jyb4c_common-reserved", "--input=" + reservedTermsPath);
|
||||
verifyXnq9jyb4cInDatastore();
|
||||
assertThat(ReservedListDao.checkExists("xn--q9jyb4c_common-reserved")).isTrue();
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
|
||||
<command>
|
||||
<check>
|
||||
<domain:check xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
||||
<domain:name>example.tld</domain:name>
|
||||
</domain:check>
|
||||
</check>
|
||||
<extension>
|
||||
<fee:check xmlns:fee="urn:ietf:params:xml:ns:fee-0.6">
|
||||
<fee:domain>
|
||||
<fee:name>example.tld</fee:name>
|
||||
<fee:command>create</fee:command>
|
||||
<fee:period unit="y">1</fee:period>
|
||||
</fee:domain>
|
||||
</fee:check>
|
||||
<allocationToken:allocationToken
|
||||
xmlns:allocationToken="urn:ietf:params:xml:ns:allocationToken-1.0">
|
||||
abc123
|
||||
</allocationToken:allocationToken>
|
||||
</extension>
|
||||
<clTRID>RegistryTool</clTRID>
|
||||
</command>
|
||||
</epp>
|
||||
Generated
+293
-158
@@ -4,6 +4,12 @@
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/color-name": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
|
||||
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"accepts": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
|
||||
@@ -29,6 +35,22 @@
|
||||
"es6-promisify": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"anymatch": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
|
||||
@@ -105,12 +127,6 @@
|
||||
"integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==",
|
||||
"dev": true
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz",
|
||||
"integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==",
|
||||
"dev": true
|
||||
},
|
||||
"body-parser": {
|
||||
"version": "1.19.0",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
|
||||
@@ -148,26 +164,10 @@
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"buffer-alloc": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
|
||||
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-alloc-unsafe": "^1.1.0",
|
||||
"buffer-fill": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"buffer-alloc-unsafe": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
|
||||
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
|
||||
"dev": true
|
||||
},
|
||||
"buffer-fill": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
|
||||
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
|
||||
"buffer-crc32": {
|
||||
"version": "0.2.13",
|
||||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
||||
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
|
||||
"dev": true
|
||||
},
|
||||
"buffer-from": {
|
||||
@@ -188,22 +188,54 @@
|
||||
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=",
|
||||
"dev": true
|
||||
},
|
||||
"camelcase": {
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
|
||||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
|
||||
"dev": true
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
|
||||
"integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz",
|
||||
"integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"anymatch": "~3.1.1",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.1.1",
|
||||
"fsevents": "~2.1.2",
|
||||
"glob-parent": "~5.1.0",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.2.0"
|
||||
"readdirp": "~3.3.0"
|
||||
}
|
||||
},
|
||||
"cliui": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
|
||||
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^4.2.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"wrap-ansi": "^6.2.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
||||
@@ -297,6 +329,12 @@
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"decamelize": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
||||
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
|
||||
"dev": true
|
||||
},
|
||||
"depd": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
|
||||
@@ -327,6 +365,12 @@
|
||||
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
|
||||
"dev": true
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||
"dev": true
|
||||
},
|
||||
"encodeurl": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||
@@ -441,21 +485,21 @@
|
||||
"dev": true
|
||||
},
|
||||
"extract-zip": {
|
||||
"version": "1.6.7",
|
||||
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
|
||||
"integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",
|
||||
"integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"concat-stream": "1.6.2",
|
||||
"debug": "2.6.9",
|
||||
"mkdirp": "0.5.1",
|
||||
"yauzl": "2.4.1"
|
||||
"concat-stream": "^1.6.2",
|
||||
"debug": "^2.6.9",
|
||||
"mkdirp": "^0.5.4",
|
||||
"yauzl": "^2.10.0"
|
||||
}
|
||||
},
|
||||
"fd-slicer": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
||||
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
||||
"integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pend": "~1.2.0"
|
||||
@@ -485,16 +529,26 @@
|
||||
"unpipe": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"find-up": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^5.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"flatted": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
|
||||
"integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
|
||||
"integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
|
||||
"dev": true
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz",
|
||||
"integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==",
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz",
|
||||
"integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^3.0.0"
|
||||
@@ -550,6 +604,12 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"dev": true
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.6",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||
@@ -565,9 +625,9 @@
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
|
||||
"integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
@@ -696,6 +756,12 @@
|
||||
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
||||
"dev": true
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"dev": true
|
||||
},
|
||||
"is-glob": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
|
||||
@@ -718,13 +784,10 @@
|
||||
"dev": true
|
||||
},
|
||||
"isbinaryfile": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz",
|
||||
"integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-alloc": "^1.2.0"
|
||||
}
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.6.tgz",
|
||||
"integrity": "sha512-ORrEy+SNVqUhrCaal4hA4fBzhggQQ+BaLntyPOdoEiwlKZW9BZiJXjg3RMiruE4tPEI3pyVPpySHQF/dKWperg==",
|
||||
"dev": true
|
||||
},
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
@@ -748,12 +811,11 @@
|
||||
}
|
||||
},
|
||||
"karma": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/karma/-/karma-4.4.1.tgz",
|
||||
"integrity": "sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/karma/-/karma-5.0.1.tgz",
|
||||
"integrity": "sha512-xrDGtZ0mykEQjx1BUHOP1ITi39MDsCGocmSvLJWHxUQpxuKwxk3ZUrC6HI2VWh1plLC6+7cA3B19m12yzO/FRw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird": "^3.3.0",
|
||||
"body-parser": "^1.16.1",
|
||||
"braces": "^3.0.2",
|
||||
"chokidar": "^3.0.0",
|
||||
@@ -765,20 +827,19 @@
|
||||
"glob": "^7.1.1",
|
||||
"graceful-fs": "^4.1.2",
|
||||
"http-proxy": "^1.13.0",
|
||||
"isbinaryfile": "^3.0.0",
|
||||
"isbinaryfile": "^4.0.2",
|
||||
"lodash": "^4.17.14",
|
||||
"log4js": "^4.0.0",
|
||||
"mime": "^2.3.1",
|
||||
"minimatch": "^3.0.2",
|
||||
"optimist": "^0.6.1",
|
||||
"qjobs": "^1.1.4",
|
||||
"range-parser": "^1.2.0",
|
||||
"rimraf": "^2.6.0",
|
||||
"safe-buffer": "^5.0.1",
|
||||
"socket.io": "2.1.1",
|
||||
"source-map": "^0.6.1",
|
||||
"tmp": "0.0.33",
|
||||
"useragent": "2.3.0"
|
||||
"ua-parser-js": "0.7.21",
|
||||
"yargs": "^15.3.1"
|
||||
}
|
||||
},
|
||||
"karma-chrome-launcher": {
|
||||
@@ -806,6 +867,15 @@
|
||||
"jasmine-core": "^3.3"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
@@ -842,16 +912,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "4.1.5",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
|
||||
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pseudomap": "^1.0.2",
|
||||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
@@ -865,18 +925,18 @@
|
||||
"dev": true
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.40.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
|
||||
"integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
|
||||
"version": "1.43.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz",
|
||||
"integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==",
|
||||
"dev": true
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.24",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
|
||||
"integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
|
||||
"version": "2.1.26",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz",
|
||||
"integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mime-db": "1.40.0"
|
||||
"mime-db": "1.43.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
@@ -888,25 +948,19 @@
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
||||
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
|
||||
"dev": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
|
||||
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
"minimist": "^1.2.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -959,22 +1013,36 @@
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"optimist": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
||||
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "~0.0.1",
|
||||
"wordwrap": "~0.0.2"
|
||||
}
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"dev": true
|
||||
},
|
||||
"parseqs": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
|
||||
@@ -999,6 +1067,12 @@
|
||||
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
||||
"dev": true
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||
"dev": true
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
@@ -1012,9 +1086,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"picomatch": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz",
|
||||
"integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==",
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
|
||||
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
|
||||
"dev": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
@@ -1035,12 +1109,6 @@
|
||||
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=",
|
||||
"dev": true
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
|
||||
"dev": true
|
||||
},
|
||||
"puppeteer": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.0.0.tgz",
|
||||
@@ -1114,9 +1182,9 @@
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"version": "2.3.7",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
||||
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
@@ -1143,14 +1211,26 @@
|
||||
}
|
||||
},
|
||||
"readdirp": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
|
||||
"integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
|
||||
"integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"picomatch": "^2.0.4"
|
||||
"picomatch": "^2.0.7"
|
||||
}
|
||||
},
|
||||
"require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
|
||||
"dev": true
|
||||
},
|
||||
"require-main-filename": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
||||
"dev": true
|
||||
},
|
||||
"requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
@@ -1173,9 +1253,9 @@
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
|
||||
"integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
@@ -1184,6 +1264,12 @@
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"dev": true
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"dev": true
|
||||
},
|
||||
"setprototypeof": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
|
||||
@@ -1216,9 +1302,9 @@
|
||||
}
|
||||
},
|
||||
"socket.io-adapter": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz",
|
||||
"integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=",
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz",
|
||||
"integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==",
|
||||
"dev": true
|
||||
},
|
||||
"socket.io-client": {
|
||||
@@ -1318,6 +1404,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"string-width": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
|
||||
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
@@ -1335,6 +1432,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"tmp": {
|
||||
"version": "0.0.33",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||||
@@ -1381,6 +1487,12 @@
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
|
||||
"dev": true
|
||||
},
|
||||
"ua-parser-js": {
|
||||
"version": "0.7.21",
|
||||
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz",
|
||||
"integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ultron": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
|
||||
@@ -1399,16 +1511,6 @@
|
||||
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
|
||||
"dev": true
|
||||
},
|
||||
"useragent": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
|
||||
"integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "4.1.x",
|
||||
"tmp": "0.0.x"
|
||||
}
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
@@ -1436,12 +1538,23 @@
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"wordwrap": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
||||
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
|
||||
"which-module": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
|
||||
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
|
||||
"dev": true
|
||||
},
|
||||
"wrap-ansi": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
|
||||
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.0.0",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
@@ -1457,14 +1570,6 @@
|
||||
"async-limiter": "~1.0.0",
|
||||
"safe-buffer": "~5.1.0",
|
||||
"ultron": "~1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"xmlhttprequest-ssl": {
|
||||
@@ -1473,19 +1578,49 @@
|
||||
"integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=",
|
||||
"dev": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
|
||||
"y18n": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
|
||||
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
|
||||
"dev": true
|
||||
},
|
||||
"yauzl": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
|
||||
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
|
||||
"yargs": {
|
||||
"version": "15.3.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz",
|
||||
"integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fd-slicer": "~1.0.1"
|
||||
"cliui": "^6.0.0",
|
||||
"decamelize": "^1.2.0",
|
||||
"find-up": "^4.1.0",
|
||||
"get-caller-file": "^2.0.1",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^2.0.0",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^4.2.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^4.0.0",
|
||||
"yargs-parser": "^18.1.1"
|
||||
}
|
||||
},
|
||||
"yargs-parser": {
|
||||
"version": "18.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz",
|
||||
"integrity": "sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"camelcase": "^5.0.0",
|
||||
"decamelize": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"yauzl": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
|
||||
"integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-crc32": "~0.2.3",
|
||||
"fd-slicer": "~1.1.0"
|
||||
}
|
||||
},
|
||||
"yeast": {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"jasmine-core": "3.4.0",
|
||||
"karma": "^4.4.1",
|
||||
"karma": "^5.0.1",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-closure": "0.1.3",
|
||||
"karma-jasmine": "2.0.1",
|
||||
|
||||
Reference in New Issue
Block a user