Skip to content

Commit d9afcd6

Browse files
committed
Support uaa setups without password reset endpoint
Tests login endpoint instead, which should usually be present
1 parent 1d3eae3 commit d9afcd6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,17 @@ public void getInfo() {
9595
this.uaaClient
9696
.serverInformation()
9797
.getInfo(GetInfoRequest.builder().build())
98-
.map(response -> response.getLinks().getPassword())
98+
.map(response -> response.getLinks().getLogin())
9999
.as(StepVerifier::create)
100-
.consumeNextWith(endsWithExpectation("password"))
100+
.consumeNextWith(containsExpectation("login"))
101101
.expectComplete()
102102
.verify(Duration.ofMinutes(5));
103103
}
104104

105+
private static Consumer<String> containsExpectation(String substring) {
106+
return actual -> assertThat(actual).contains(substring);
107+
}
108+
105109
private static Consumer<String> endsWithExpectation(String suffix) {
106110
return actual -> assertThat(actual).endsWith(suffix);
107111
}

0 commit comments

Comments
 (0)