Fixed broken test.
This commit is contained in:
@@ -85,9 +85,9 @@ public class PreAuthTokenSourceTrustAuthenticationProviderTest {
|
|||||||
when(webAuthenticationDetailsMock.getRemoteAddress()).thenReturn(remoteAddress);
|
when(webAuthenticationDetailsMock.getRemoteAddress()).thenReturn(remoteAddress);
|
||||||
|
|
||||||
// test, should throw authentication exception
|
// test, should throw authentication exception
|
||||||
final Authentication authenticate = underTestWithSourceIpCheck.authenticate(token);
|
|
||||||
try {
|
try {
|
||||||
assertThat(authenticate.isAuthenticated()).isTrue();
|
underTestWithSourceIpCheck.authenticate(token);
|
||||||
fail("as source is not trusted.");
|
fail("as source is not trusted.");
|
||||||
} catch (final InsufficientAuthenticationException e) {
|
} catch (final InsufficientAuthenticationException e) {
|
||||||
|
|
||||||
|
|||||||
@@ -379,7 +379,6 @@ public class ControllerManagement {
|
|||||||
handleErrorOnAction(mergedAction, mergedTarget);
|
handleErrorOnAction(mergedAction, mergedTarget);
|
||||||
break;
|
break;
|
||||||
case FINISHED:
|
case FINISHED:
|
||||||
|
|
||||||
handleFinishedAndStoreInTargetStatus(mergedTarget, mergedAction);
|
handleFinishedAndStoreInTargetStatus(mergedTarget, mergedAction);
|
||||||
break;
|
break;
|
||||||
case CANCELED:
|
case CANCELED:
|
||||||
@@ -399,7 +398,6 @@ public class ControllerManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleErrorOnAction(final Action mergedAction, final Target mergedTarget) {
|
private void handleErrorOnAction(final Action mergedAction, final Target mergedTarget) {
|
||||||
// set action inactive
|
|
||||||
mergedAction.setActive(false);
|
mergedAction.setActive(false);
|
||||||
mergedAction.setStatus(Status.ERROR);
|
mergedAction.setStatus(Status.ERROR);
|
||||||
mergedTarget.setAssignedDistributionSet(null);
|
mergedTarget.setAssignedDistributionSet(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user