mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 18:26:12 +02:00
Convert entire project to strict lexicographical import sort ordering
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127234970
This commit is contained in:
parent
2caba95d28
commit
aa2f283f7c
1065 changed files with 893 additions and 3572 deletions
|
@ -16,14 +16,12 @@ package google.registry.testing;
|
|||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.launch.LaunchNotice;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.eppcommon.AuthInfo;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/** Truth subject for asserting things about {@link DomainResource} instances. */
|
||||
|
|
|
@ -23,18 +23,15 @@ import static google.registry.testing.HistoryEntrySubject.assertAboutHistoryEntr
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.Subject;
|
||||
|
||||
import google.registry.model.EppResource;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
import google.registry.testing.TruthChainer.Which;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/** Base Truth subject for asserting things about epp resources. */
|
||||
abstract class AbstractEppResourceSubject
|
||||
|
|
|
@ -33,16 +33,21 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.io.Files;
|
||||
|
||||
import com.googlecode.objectify.ObjectifyFilter;
|
||||
|
||||
import google.registry.model.ofy.ObjectifyService;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.model.registrar.Registrar.State;
|
||||
import google.registry.model.registrar.RegistrarAddress;
|
||||
import google.registry.model.registrar.RegistrarContact;
|
||||
import google.registry.util.Clock;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.LogManager;
|
||||
import javax.annotation.Nullable;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
@ -53,16 +58,6 @@ import org.junit.rules.TestRule;
|
|||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.LogManager;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* JUnit Rule for managing the App Engine testing environment.
|
||||
*
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
|
||||
package google.registry.testing;
|
||||
|
||||
import java.security.Security;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
import java.security.Security;
|
||||
|
||||
/**
|
||||
* JUnit Rule for registering {@link BouncyCastleProvider} with Java Security.
|
||||
*
|
||||
|
|
|
@ -19,7 +19,6 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.contact.PostalInfo;
|
||||
import google.registry.model.eppcommon.AuthInfo;
|
||||
|
|
|
@ -46,13 +46,11 @@ import com.google.common.collect.ImmutableList;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.ImmutableSortedMap;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.Ref;
|
||||
import com.googlecode.objectify.VoidWork;
|
||||
import com.googlecode.objectify.Work;
|
||||
import com.googlecode.objectify.cmd.Saver;
|
||||
|
||||
import google.registry.config.RegistryEnvironment;
|
||||
import google.registry.model.Buildable;
|
||||
import google.registry.model.EppResource;
|
||||
|
@ -91,12 +89,10 @@ import google.registry.model.transfer.TransferData.Builder;
|
|||
import google.registry.model.transfer.TransferData.TransferServerApproveEntity;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import google.registry.tmch.LordnTask;
|
||||
|
||||
import java.util.List;
|
||||
import org.joda.money.Money;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** Static utils for setting up test resources. */
|
||||
public class DatastoreHelper {
|
||||
|
||||
|
|
|
@ -21,12 +21,10 @@ import static com.google.common.truth.Truth.assertThat;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
|
||||
import google.registry.model.domain.DomainApplication;
|
||||
import google.registry.model.domain.launch.ApplicationStatus;
|
||||
import google.registry.model.smd.EncodedSignedMark;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/** Truth subject for asserting things about {@link DomainApplication} instances. */
|
||||
|
|
|
@ -19,13 +19,10 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.Objects;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/** Truth subject for asserting things about {@link DomainResource} instances. */
|
||||
public final class DomainResourceSubject
|
||||
|
|
|
@ -19,9 +19,7 @@ import static google.registry.testing.TestDataHelper.loadFileWithSubstitutions;
|
|||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/** Test rule that loads an Epp object from a file. */
|
||||
|
|
|
@ -26,13 +26,11 @@ import google.registry.model.eppoutput.EppResponse;
|
|||
import google.registry.util.Clock;
|
||||
import google.registry.util.SystemClock;
|
||||
import google.registry.xml.ValidationMode;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* A test rule similar to JUnit's {@code ExpectedException} rule that does extra checking to ensure
|
||||
* that {@link EppException} derivatives have EPP-compliant error messages.
|
||||
|
|
|
@ -19,15 +19,12 @@ import static org.joda.time.DateTimeZone.UTC;
|
|||
import static org.joda.time.Duration.millis;
|
||||
|
||||
import google.registry.util.Clock;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.ReadableDuration;
|
||||
import org.joda.time.ReadableInstant;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/** A mock clock for testing purposes that supports telling, setting, and advancing the time. */
|
||||
@ThreadSafe
|
||||
public final class FakeClock implements Clock {
|
||||
|
|
|
@ -19,7 +19,6 @@ import static com.google.common.base.Preconditions.checkState;
|
|||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
package google.registry.testing;
|
||||
|
||||
import google.registry.request.JsonResponse;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/** Fake implementation of {@link JsonResponse} for testing. */
|
||||
|
|
|
@ -21,13 +21,10 @@ import static java.util.Collections.unmodifiableMap;
|
|||
|
||||
import com.google.common.base.Throwables;
|
||||
import com.google.common.net.MediaType;
|
||||
|
||||
import google.registry.request.Response;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/** Fake implementation of {@link Response} for testing. */
|
||||
public final class FakeResponse implements Response {
|
||||
|
|
|
@ -15,11 +15,9 @@
|
|||
package google.registry.testing;
|
||||
|
||||
import com.google.common.io.ByteSource;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.servlet.ServletInputStream;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,6 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ import static com.google.common.base.Preconditions.checkArgument;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import google.registry.util.Sleeper;
|
||||
|
||||
import org.joda.time.ReadableDuration;
|
||||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
import org.joda.time.ReadableDuration;
|
||||
|
||||
/** Sleeper implementation for unit tests that advances {@link FakeClock} rather than sleep. */
|
||||
@ThreadSafe
|
||||
|
|
|
@ -19,7 +19,6 @@ import com.google.appengine.api.urlfetch.HTTPRequest;
|
|||
import com.google.appengine.api.urlfetch.HTTPResponse;
|
||||
import com.google.appengine.api.urlfetch.URLFetchService;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
|
|
@ -18,7 +18,6 @@ import com.google.appengine.api.urlfetch.HTTPRequest;
|
|||
import com.google.appengine.api.urlfetch.HTTPResponse;
|
||||
import com.google.appengine.api.urlfetch.URLFetchService;
|
||||
import com.google.common.util.concurrent.Futures;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.Future;
|
||||
|
|
|
@ -23,9 +23,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.net.InetAddresses;
|
||||
|
||||
import com.googlecode.objectify.Ref;
|
||||
|
||||
import google.registry.model.EppResource;
|
||||
import google.registry.model.contact.ContactAddress;
|
||||
import google.registry.model.contact.ContactPhoneNumber;
|
||||
|
@ -43,13 +41,10 @@ import google.registry.model.registrar.RegistrarAddress;
|
|||
import google.registry.model.registrar.RegistrarContact;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.util.Idn;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/** Test helper methods for the rdap and whois packages. */
|
||||
public final class FullFieldsTestEntityHelper {
|
||||
|
|
|
@ -18,7 +18,6 @@ import com.google.appengine.tools.cloudstorage.GcsFileOptions;
|
|||
import com.google.appengine.tools.cloudstorage.GcsFilename;
|
||||
import com.google.appengine.tools.cloudstorage.GcsService;
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
|
|
|
@ -20,7 +20,6 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.SubjectFactory;
|
||||
|
||||
import google.registry.model.EppResource;
|
||||
|
||||
/** Truth subject for asserting things about {@link EppResource} instances. */
|
||||
|
|
|
@ -20,11 +20,9 @@ import static com.google.common.base.Preconditions.checkState;
|
|||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
|
||||
import com.google.common.io.ByteSource;
|
||||
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
/**
|
||||
* GnuPG system command JUnit rule.
|
||||
|
|
|
@ -20,11 +20,9 @@ import com.google.common.base.Optional;
|
|||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.Subject;
|
||||
|
||||
import google.registry.model.domain.Period;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/** Utility methods for asserting things about {@link HistoryEntry} instances. */
|
||||
|
|
|
@ -19,7 +19,6 @@ import static com.google.common.truth.Truth.assertAbout;
|
|||
|
||||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
|
||||
import google.registry.model.host.HostResource;
|
||||
|
||||
/** Truth subject for asserting things about {@link HostResource} instances. */
|
||||
|
|
|
@ -16,15 +16,13 @@ package google.registry.testing;
|
|||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
/**
|
||||
* JUnit Rule for overriding {@code private static} fields during a test.
|
||||
|
|
|
@ -23,16 +23,14 @@ import static org.mockito.Mockito.spy;
|
|||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.CheckReturnValue;
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
/** JUnit Rule that uses Mockito to spy on I/O streams to make sure they're healthy. */
|
||||
public final class IoSpyRule extends ExternalResource {
|
||||
|
|
|
@ -20,9 +20,7 @@ import com.google.common.testing.TestLogHandler;
|
|||
import com.google.common.truth.AbstractVerb.DelegatedVerb;
|
||||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.Subject;
|
||||
|
||||
import google.registry.testing.TruthChainer.And;
|
||||
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
|
|
|
@ -17,7 +17,6 @@ package google.registry.testing;
|
|||
import com.google.common.truth.FailureStrategy;
|
||||
import com.google.common.truth.Subject;
|
||||
import com.google.common.truth.SubjectFactory;
|
||||
|
||||
import google.registry.util.TypeUtils.TypeInstantiator;
|
||||
|
||||
/** Helper to reduce boilerplate in making new Truth subject classes. */
|
||||
|
|
|
@ -17,11 +17,9 @@ package google.registry.testing;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import google.registry.config.RegistryConfig;
|
||||
import google.registry.config.RegistryEnvironment;
|
||||
import google.registry.config.TestRegistryConfig;
|
||||
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
/** JUnit Rule for overriding Domain Registry configuration values. */
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
|
||||
package google.registry.testing;
|
||||
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
/** Utility class for capturing channel output bytes from google cloud storage library mock. */
|
||||
public final class SlurpAnswer implements Answer<Integer> {
|
||||
|
|
|
@ -17,12 +17,9 @@ package google.registry.testing;
|
|||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.CacheLoader;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
|
||||
import google.registry.util.FormattingLogger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/** Utility class for getting system information in tests. */
|
||||
|
|
|
@ -18,15 +18,12 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
/**
|
||||
* JUnit Rule for overriding the values Java system properties during tests.
|
||||
|
|
|
@ -42,11 +42,7 @@ import com.google.common.collect.Maps;
|
|||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.net.HttpHeaders;
|
||||
import com.google.common.net.MediaType;
|
||||
|
||||
import google.registry.dns.DnsConstants;
|
||||
|
||||
import org.joda.time.Duration;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
@ -56,8 +52,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import org.joda.time.Duration;
|
||||
|
||||
/** Static utility functions for testing task queues. */
|
||||
public class TaskQueueHelper {
|
||||
|
|
|
@ -20,7 +20,6 @@ import com.googlecode.objectify.Key;
|
|||
import com.googlecode.objectify.annotation.Entity;
|
||||
import com.googlecode.objectify.annotation.Id;
|
||||
import com.googlecode.objectify.annotation.Parent;
|
||||
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.common.EntityGroupRoot;
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
|
|
|
@ -32,14 +32,9 @@ import com.google.appengine.tools.pipeline.impl.servlets.PipelineServlet;
|
|||
import com.google.appengine.tools.pipeline.impl.servlets.TaskHandler;
|
||||
import com.google.apphosting.api.ApiProxy;
|
||||
import com.google.common.base.CharMatcher;
|
||||
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.FakeClock;
|
||||
import google.registry.util.FormattingLogger;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
@ -48,10 +43,11 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
|
||||
/**
|
||||
* Base test class for mapreduces. Adapted from EndToEndTestCase with some modifications that
|
||||
|
|
|
@ -17,16 +17,13 @@ package google.registry.testing.sftp;
|
|||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import google.registry.util.NetworkUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nullable;
|
||||
import org.apache.ftpserver.FtpServer;
|
||||
import org.apache.ftpserver.ftplet.FtpException;
|
||||
import org.junit.rules.ExternalResource;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* JUnit Rule for creating an in-process {@link TestSftpServer SFTP Server}.
|
||||
*
|
||||
|
|
|
@ -16,7 +16,16 @@ package google.registry.testing.sftp;
|
|||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.security.KeyPair;
|
||||
import java.security.PublicKey;
|
||||
import java.security.Security;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.annotation.Nullable;
|
||||
import org.apache.ftpserver.FtpServer;
|
||||
import org.apache.ftpserver.ftplet.FtpException;
|
||||
import org.apache.sshd.common.NamedFactory;
|
||||
|
@ -36,18 +45,6 @@ import org.bouncycastle.openssl.PEMKeyPair;
|
|||
import org.bouncycastle.openssl.PEMParser;
|
||||
import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.security.KeyPair;
|
||||
import java.security.PublicKey;
|
||||
import java.security.Security;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/** In-process SFTP server using Apache SSHD. */
|
||||
public class TestSftpServer implements FtpServer {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue