mirror of
https://github.com/google/nomulus
synced 2026-09-07 16:47:03 +00:00
Add more absent clTrid unit tests
In RFC 5730, clTrid is specified as optional. We ran into an error earlier this year in which a registrar was not passing a client transaction id and we didn't handle it correctly. So, this CL adds some tests of common EPP operations verify that they work correctly when the clTrid is not specified. This also slightly improves some flow logic to make it more obvious at first glance that clTrid is indeed optional. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=202000845
This commit is contained in:
@@ -63,6 +63,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import javax.annotation.Nullable;
|
||||
import org.joda.time.DateTime;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@@ -141,8 +142,9 @@ public abstract class FlowTestCase<F extends Flow> extends ShardableTestCase {
|
||||
return TestDataHelper.loadFile(getClass(), filename, substitutions);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected String getClientTrid() throws Exception {
|
||||
return eppLoader.getEpp().getCommandWrapper().getClTrid();
|
||||
return eppLoader.getEpp().getCommandWrapper().getClTrid().orElse(null);
|
||||
}
|
||||
|
||||
/** Gets the client ID that the flow will run as. */
|
||||
|
||||
Reference in New Issue
Block a user