Skip to content

Commit 649b9c8

Browse files
committed
Test script added as requests
1 parent 11c54b2 commit 649b9c8

File tree

2 files changed

+32
-31
lines changed

2 files changed

+32
-31
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,12 @@ In case you've a question, find a bug, or otherwise need support, use our [commu
8585

8686
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSE.txt) file.
8787

88-
# Suppliers - in progress for Service Consumption -
88+
# Suppliers - in progress for Messaging & Service Consumption -
8989

9090
## TODOs
9191

92-
1. Fix problem with `await S4bupa.read (Suppliers).where('ID in',IDs)` --> Johannes
93-
2. Fix issues when running in same process
94-
3. Automated tests
92+
1. Fix issues when running in same process
93+
2. Automated tests
9594

9695
## Usage
9796

suppliers/requests.http

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,51 @@
11

2-
@server = http://localhost:4004
2+
@server = http://localhost:4006
33
@bpServer = http://localhost:5001
44
@authAlice = Authorization: Basic alice:
55

6-
PATCH {{server}}/api-business-partner/A_BusinessPartner('ACME')
7-
Content-Type: application/json
8-
9-
{
10-
"BusinessPartnerFullName": "Alice Changed"
11-
}
12-
6+
###
7+
### Replication on changed Business Partner
138
###
149

15-
PATCH {{server}}/admin/Books(201)
16-
{{authAlice}}
17-
Content-Type: application/json
10+
### 1. Check supplier name before update ("A Company Making Everything")
1811

19-
{
20-
"supplier_ID": "PNG"
21-
}
12+
GET {{server}}/admin/Books(299)?$expand=supplier
13+
{{authAlice}}
2214

23-
###
15+
### 2. Change Business Partner -> Triggers event that updates supplier replication
2416

25-
PATCH {{bpServer}}/api-business-partner/A_BusinessPartner('PNG')
17+
PATCH {{bpServer}}/api-business-partner/A_BusinessPartner('ACME')
2618
Content-Type: application/json
2719

2820
{
29-
"BusinessPartnerFullName": "Penguin Books (Changed)"
21+
"BusinessPartnerFullName": "A Company Making Everything *better*"
3022
}
3123

32-
###
24+
### 3. Check supplier name after update ("A Company Making Everything *better*")
3325

34-
GET {{server}}/admin/Books?$top=11&$expand=supplier
26+
GET {{server}}/admin/Books(299)?$expand=supplier
3527
{{authAlice}}
3628

37-
@S4bupa = http://localhost:4006/api-business-partner
29+
###
30+
### Replication on new assigned supplier
31+
###
3832

39-
#################################################
40-
#
41-
# Suppliers Service (-> S/4)
42-
#
33+
### 1. No supplier is assigned to "Wuthering Heights"
4334

44-
PATCH {{S4bupa}}/A_BusinessPartner('ACME')
35+
GET {{server}}/admin/Books(201)?$expand=supplier
36+
{{authAlice}}
37+
38+
### 2. Assign supplier ID "PNG"
39+
40+
PATCH {{server}}/admin/Books(201)
41+
{{authAlice}}
4542
Content-Type: application/json
4643

47-
{ "FirstName":"ACME" }
44+
{
45+
"supplier_ID": "PNG"
46+
}
4847

49-
###
48+
### 3. Supplier information is replicated
49+
50+
GET {{server}}/admin/Books(201)?$expand=supplier
51+
{{authAlice}}

0 commit comments

Comments
 (0)