mirror of
https://github.com/google/nomulus.git
synced 2025-05-30 01:10:14 +02: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:
parent
36378f6b10
commit
b21042bda9
1 changed files with 11 additions and 17 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue