Skip to content

Commit 3a328ad

Browse files
committed
Add a test case involving cds.serve(..).with(..)
Add a `cds.serve(...).with(...)` that expands the functionality of Service3 which lacks a CDS declaration. Since Service3 is missing a CDS declaration, all of the handlers registrated in the `.with` method call should be considered as exposed.
1 parent 985b25e commit 3a328ad

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

javascript/frameworks/cap/test/models/cds/remoteflowsources/ExposedServices.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
| server.js:7:32:7:34 | req |
2+
| server.js:11:32:11:34 | req |
23
| srv/service1.js:6:29:6:31 | req |
34
| srv/service1.js:12:29:12:31 | req |
45
| srv/service1.js:18:29:18:31 | req |

javascript/frameworks/cap/test/models/cds/remoteflowsources/server.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ cds.serve("all").in(app);
55

66
cds.serve('Service1').with((srv) => {
77
srv.before('READ', 'Books', (req) => req.reply([])) // SAFE: Exposed service (fallback), but not a taint source
8+
})
9+
10+
cds.serve('Service3').with((srv) => {
11+
srv.before('READ', 'Books', (req) => req.reply([])) // SAFE: Exposed service (fallback), but not a taint source
812
})

0 commit comments

Comments
 (0)