Skip to content

Commit bc6c2d9

Browse files
committed
Update "Include" tutorial to include gateway header in 404 response
1 parent b636a43 commit bc6c2d9

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

distribution/src/test/java/com/predic8/membrane/tutorials/advanced/IncludeTutorialTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ void ordersApiReturnsOrderList() {
5454
}
5555

5656
@Test
57-
void unknownPathReturns404() {
57+
void unknownPathReturns404WithGatewayHeader() {
5858
// @formatter:off
5959
given()
6060
.when()
6161
.get("http://localhost:2000/unknown")
6262
.then()
63-
.statusCode(404);
63+
.statusCode(404)
64+
.header("X-Gateway", equalTo("Membrane"));
6465
// @formatter:on
6566
}
6667
}

distribution/tutorials/advanced/95-Include.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
# 4.) Call an unknown path:
2424
# curl -i http://localhost:2000/unknown
2525
#
26-
# HTTP/1.1 404 Not Found
26+
# X-Gateway: Membrane
27+
# 404 Not Found
2728

2829
# Included files define the per-service APIs.
2930
include:

0 commit comments

Comments
 (0)