Test script added as requests
This commit is contained in:
@@ -85,13 +85,12 @@ In case you've a question, find a bug, or otherwise need support, use our [commu
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
# Suppliers - in progress for Service Consumption -
|
# Suppliers - in progress for Messaging & Service Consumption -
|
||||||
|
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
1. Fix problem with `await S4bupa.read (Suppliers).where('ID in',IDs)` --> Johannes
|
1. Fix issues when running in same process
|
||||||
2. Fix issues when running in same process
|
2. Automated tests
|
||||||
3. Automated tests
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,41 @@
|
|||||||
|
|
||||||
@server = http://localhost:4004
|
@server = http://localhost:4006
|
||||||
@bpServer = http://localhost:5001
|
@bpServer = http://localhost:5001
|
||||||
@authAlice = Authorization: Basic alice:
|
@authAlice = Authorization: Basic alice:
|
||||||
|
|
||||||
PATCH {{server}}/api-business-partner/A_BusinessPartner('ACME')
|
###
|
||||||
|
### Replication on changed Business Partner
|
||||||
|
###
|
||||||
|
|
||||||
|
### 1. Check supplier name before update ("A Company Making Everything")
|
||||||
|
|
||||||
|
GET {{server}}/admin/Books(299)?$expand=supplier
|
||||||
|
{{authAlice}}
|
||||||
|
|
||||||
|
### 2. Change Business Partner -> Triggers event that updates supplier replication
|
||||||
|
|
||||||
|
PATCH {{bpServer}}/api-business-partner/A_BusinessPartner('ACME')
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"BusinessPartnerFullName": "Alice Changed"
|
"BusinessPartnerFullName": "A Company Making Everything *better*"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### 3. Check supplier name after update ("A Company Making Everything *better*")
|
||||||
|
|
||||||
|
GET {{server}}/admin/Books(299)?$expand=supplier
|
||||||
|
{{authAlice}}
|
||||||
|
|
||||||
###
|
###
|
||||||
|
### Replication on new assigned supplier
|
||||||
|
###
|
||||||
|
|
||||||
|
### 1. No supplier is assigned to "Wuthering Heights"
|
||||||
|
|
||||||
|
GET {{server}}/admin/Books(201)?$expand=supplier
|
||||||
|
{{authAlice}}
|
||||||
|
|
||||||
|
### 2. Assign supplier ID "PNG"
|
||||||
|
|
||||||
PATCH {{server}}/admin/Books(201)
|
PATCH {{server}}/admin/Books(201)
|
||||||
{{authAlice}}
|
{{authAlice}}
|
||||||
@@ -20,30 +45,7 @@ Content-Type: application/json
|
|||||||
"supplier_ID": "PNG"
|
"supplier_ID": "PNG"
|
||||||
}
|
}
|
||||||
|
|
||||||
###
|
### 3. Supplier information is replicated
|
||||||
|
|
||||||
PATCH {{bpServer}}/api-business-partner/A_BusinessPartner('PNG')
|
GET {{server}}/admin/Books(201)?$expand=supplier
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"BusinessPartnerFullName": "Penguin Books (Changed)"
|
|
||||||
}
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
GET {{server}}/admin/Books?$top=11&$expand=supplier
|
|
||||||
{{authAlice}}
|
{{authAlice}}
|
||||||
|
|
||||||
@S4bupa = http://localhost:4006/api-business-partner
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
#
|
|
||||||
# Suppliers Service (-> S/4)
|
|
||||||
#
|
|
||||||
|
|
||||||
PATCH {{S4bupa}}/A_BusinessPartner('ACME')
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{ "FirstName":"ACME" }
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|||||||
Reference in New Issue
Block a user