Fix rsocket test
Request route that exists; add additional error message verification Fixes gh-8154
This commit is contained in:
parent
a9dabf6efb
commit
97085ef310
|
@ -103,7 +103,9 @@ public class RSocketMessageHandlerITests {
|
||||||
.data(data)
|
.data(data)
|
||||||
.retrieveMono(String.class)
|
.retrieveMono(String.class)
|
||||||
.block()
|
.block()
|
||||||
).isInstanceOf(ApplicationErrorException.class);
|
).isInstanceOf(ApplicationErrorException.class)
|
||||||
|
.hasMessageContaining("Access Denied");
|
||||||
|
|
||||||
assertThat(this.controller.payloads).isEmpty();
|
assertThat(this.controller.payloads).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +118,9 @@ public class RSocketMessageHandlerITests {
|
||||||
.data(data)
|
.data(data)
|
||||||
.retrieveMono(String.class)
|
.retrieveMono(String.class)
|
||||||
.block()
|
.block()
|
||||||
).isInstanceOf(ApplicationErrorException.class);
|
).isInstanceOf(ApplicationErrorException.class)
|
||||||
|
.hasMessageContaining("Invalid Credentials");
|
||||||
|
|
||||||
assertThat(this.controller.payloads).isEmpty();
|
assertThat(this.controller.payloads).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,12 +153,13 @@ public class RSocketMessageHandlerITests {
|
||||||
@Test
|
@Test
|
||||||
public void retrieveFluxWhenDataFluxAndSecureThenDenied() throws Exception {
|
public void retrieveFluxWhenDataFluxAndSecureThenDenied() throws Exception {
|
||||||
Flux<String> data = Flux.just("a", "b", "c");
|
Flux<String> data = Flux.just("a", "b", "c");
|
||||||
assertThatCode(() -> this.requester.route("secure.secure.retrieve-flux")
|
assertThatCode(() -> this.requester.route("secure.retrieve-flux")
|
||||||
.data(data, String.class)
|
.data(data, String.class)
|
||||||
.retrieveFlux(String.class)
|
.retrieveFlux(String.class)
|
||||||
.collectList()
|
.collectList()
|
||||||
.block()).isInstanceOf(
|
.block()
|
||||||
ApplicationErrorException.class);
|
).isInstanceOf(ApplicationErrorException.class)
|
||||||
|
.hasMessageContaining("Access Denied");
|
||||||
|
|
||||||
assertThat(this.controller.payloads).isEmpty();
|
assertThat(this.controller.payloads).isEmpty();
|
||||||
}
|
}
|
||||||
|
@ -179,8 +184,9 @@ public class RSocketMessageHandlerITests {
|
||||||
.data(data)
|
.data(data)
|
||||||
.retrieveFlux(String.class)
|
.retrieveFlux(String.class)
|
||||||
.collectList()
|
.collectList()
|
||||||
.block()).isInstanceOf(
|
.block()
|
||||||
ApplicationErrorException.class);
|
).isInstanceOf(ApplicationErrorException.class)
|
||||||
|
.hasMessageContaining("Access Denied");
|
||||||
|
|
||||||
assertThat(this.controller.payloads).isEmpty();
|
assertThat(this.controller.payloads).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue