Test script added as requests

This commit is contained in:
Uwe Klinger
2021-06-09 08:11:51 +02:00
parent 11c54b29d0
commit 649b9c8ca8
2 changed files with 33 additions and 32 deletions

View File

@@ -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.
# Suppliers - in progress for Service Consumption -
# Suppliers - in progress for Messaging & Service Consumption -
## TODOs
1. Fix problem with `await S4bupa.read (Suppliers).where('ID in',IDs)` --> Johannes
2. Fix issues when running in same process
3. Automated tests
1. Fix issues when running in same process
2. Automated tests
## Usage

View File

@@ -1,16 +1,41 @@
@server = http://localhost:4004
@server = http://localhost:4006
@bpServer = http://localhost:5001
@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
{
"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)
{{authAlice}}
@@ -20,30 +45,7 @@ Content-Type: application/json
"supplier_ID": "PNG"
}
###
### 3. Supplier information is replicated
PATCH {{bpServer}}/api-business-partner/A_BusinessPartner('PNG')
Content-Type: application/json
{
"BusinessPartnerFullName": "Penguin Books (Changed)"
}
###
GET {{server}}/admin/Books?$top=11&$expand=supplier
GET {{server}}/admin/Books(201)?$expand=supplier
{{authAlice}}
@S4bupa = http://localhost:4006/api-business-partner
#################################################
#
# Suppliers Service (-> S/4)
#
PATCH {{S4bupa}}/A_BusinessPartner('ACME')
Content-Type: application/json
{ "FirstName":"ACME" }
###