mirror of
https://github.com/google/nomulus
synced 2026-03-27 12:55:28 +00:00
Fix the test server (#521)
* Fix the test server This rule isn't necessary any more since we merged the SQL-starting rule into the AppEngineRule logic. Furthermore, it actually causes the test server to crash because we try to drop-and-create the DB twice, the second time while the first instance is still connected.
This commit is contained in:
@@ -19,7 +19,6 @@ import com.beust.jcommander.Parameter;
|
||||
import com.beust.jcommander.Parameters;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.net.HostAndPort;
|
||||
import google.registry.persistence.transaction.JpaTestRules;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.UserInfo;
|
||||
import google.registry.tools.params.HostAndPortParameter;
|
||||
@@ -156,23 +155,18 @@ public final class RegistryTestServerMain {
|
||||
}
|
||||
};
|
||||
|
||||
Statement withAppEngine =
|
||||
AppEngineRule.builder()
|
||||
.withDatastoreAndCloudSql()
|
||||
.withUrlFetch()
|
||||
.withTaskQueue()
|
||||
.withLocalModules()
|
||||
.withUserService(
|
||||
loginIsAdmin
|
||||
? UserInfo.createAdmin(loginEmail, loginUserId)
|
||||
: UserInfo.create(loginEmail, loginUserId))
|
||||
.build()
|
||||
.apply(runner, Description.EMPTY);
|
||||
|
||||
System.out.printf("%sLoading SQL fixtures and AppEngineRule...%s\n", BLUE, RESET);
|
||||
new JpaTestRules.Builder()
|
||||
.buildIntegrationTestRule()
|
||||
.apply(withAppEngine, Description.EMPTY)
|
||||
AppEngineRule.builder()
|
||||
.withDatastoreAndCloudSql()
|
||||
.withUrlFetch()
|
||||
.withTaskQueue()
|
||||
.withLocalModules()
|
||||
.withUserService(
|
||||
loginIsAdmin
|
||||
? UserInfo.createAdmin(loginEmail, loginUserId)
|
||||
: UserInfo.create(loginEmail, loginUserId))
|
||||
.build()
|
||||
.apply(runner, Description.EMPTY)
|
||||
.evaluate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user