mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 23:33:36 +02:00
Decouple superuser from SessionMetadata
Superuser should only be settable via the tool (see [] which is merged in here but not diffbased, and which removes the implicit superuser for CharlestonRoad). It is a property of the request, not of the session (there are no sessions in the tool). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125204707
This commit is contained in:
parent
e359ab5f52
commit
fd6c4888db
44 changed files with 80 additions and 136 deletions
|
@ -70,7 +70,7 @@ public class EppTestCase extends ShardableTestCase {
|
|||
this.credentials = credentials;
|
||||
}
|
||||
|
||||
protected void setSuperuser(boolean isSuperuser) {
|
||||
protected void setIsSuperuser(boolean isSuperuser) {
|
||||
this.isSuperuser = isSuperuser;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,6 @@ public class EppTestCase extends ShardableTestCase {
|
|||
if (sessionMetadata == null) {
|
||||
sessionMetadata = new TestSessionMetadata();
|
||||
}
|
||||
sessionMetadata.setSuperuser(isSuperuser);
|
||||
String actualOutput = executeXmlCommand(input);
|
||||
if (!sessionMetadata.isValid()) {
|
||||
sessionMetadata = null;
|
||||
|
@ -118,7 +117,7 @@ public class EppTestCase extends ShardableTestCase {
|
|||
handler.eppController = new EppController();
|
||||
handler.eppController.clock = clock;
|
||||
handler.eppController.metrics = mock(EppMetrics.class);
|
||||
handler.executeEpp(sessionMetadata, credentials, false, inputXml.getBytes(UTF_8));
|
||||
handler.executeEpp(sessionMetadata, credentials, false, isSuperuser, inputXml.getBytes(UTF_8));
|
||||
assertThat(response.getStatus()).isEqualTo(SC_OK);
|
||||
assertThat(response.getContentType()).isEqualTo(APPLICATION_EPP_XML_UTF8);
|
||||
String result = response.getPayload();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue