mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 19:48:32 +02:00
Log a warning when MarksDB password isn't configured
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=231287550
This commit is contained in:
parent
44e822ed86
commit
88aa13d1a4
3 changed files with 17 additions and 8 deletions
|
@ -87,7 +87,8 @@ public class NordnVerifyActionTest {
|
|||
@Captor private ArgumentCaptor<HTTPRequest> httpRequestCaptor;
|
||||
|
||||
private final FakeResponse response = new FakeResponse();
|
||||
private final LordnRequestInitializer lordnRequestInitializer = new LordnRequestInitializer();
|
||||
private final LordnRequestInitializer lordnRequestInitializer =
|
||||
new LordnRequestInitializer(Optional.of("attack"));
|
||||
private final NordnVerifyAction action = new NordnVerifyAction();
|
||||
|
||||
@Before
|
||||
|
@ -97,7 +98,6 @@ public class NordnVerifyActionTest {
|
|||
when(fetchService.fetch(any(HTTPRequest.class))).thenReturn(httpResponse);
|
||||
createTld("gtld");
|
||||
persistResource(Registry.get("gtld").asBuilder().setLordnUsername("lolcat").build());
|
||||
lordnRequestInitializer.marksdbLordnPassword = Optional.of("attack");
|
||||
action.tld = "gtld";
|
||||
action.fetchService = fetchService;
|
||||
action.lordnRequestInitializer = lordnRequestInitializer;
|
||||
|
@ -125,7 +125,7 @@ public class NordnVerifyActionTest {
|
|||
|
||||
@Test
|
||||
public void testSuccess_noLordnPassword_doesntSetAuthorizationHeader() throws Exception {
|
||||
lordnRequestInitializer.marksdbLordnPassword = Optional.empty();
|
||||
action.lordnRequestInitializer = new LordnRequestInitializer(Optional.empty());
|
||||
action.run();
|
||||
assertThat(getHeaderFirst(getCapturedHttpRequest(), AUTHORIZATION)).isEmpty();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue