Skip to content

Commit a86029a

Browse files
Update TestTriggerChallenge.java
test the new function
1 parent c6e6c1e commit a86029a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/privacyidea/TestTriggerChallenge.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class TestTriggerChallenge
3535
private PrivacyIDEA privacyIDEA;
3636
String serviceAccount = "service";
3737
String servicePass = "pass";
38+
String forwardClientIP = "127.0.0.1";
3839

3940
@Before
4041
public void setup()
@@ -44,6 +45,7 @@ public void setup()
4445
privacyIDEA = PrivacyIDEA.newBuilder("https://127.0.0.1:1080", "test")
4546
.verifySSL(false)
4647
.serviceAccount(serviceAccount, servicePass)
48+
.forwardClientIP(forwardClientIP)
4749
.logger(new PILogImplementation())
4850
.realm("realm")
4951
.build();
@@ -60,7 +62,7 @@ public void testTriggerChallengeSuccess()
6062
mockServer.when(HttpRequest.request()
6163
.withPath(PIConstants.ENDPOINT_TRIGGERCHALLENGE)
6264
.withMethod("POST")
63-
.withBody("user=testuser&realm=realm"))
65+
.withBody("user=testuser&realm=realm&client=127.0.0.1"))
6466
.respond(HttpResponse.response().withBody(Utils.triggerChallengeSuccess()));
6567

6668
String username = "testuser";

0 commit comments

Comments
 (0)