This is an automated email from the ASF dual-hosted git repository. angeh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/fineract-cn-docker-compose.git
commit e3efc96a97a764d05c9108208072ea459a7c983e Author: Juhan Aasaru <[email protected]> AuthorDate: Fri Nov 22 14:38:08 2019 +0200 updated tests --- integration_test.sh | 11 +- ...-Initial-Requests_PART1.postman_collection.json | 2693 ++++++++++++++++++++ 2 files changed, 2703 insertions(+), 1 deletion(-) diff --git a/integration_test.sh b/integration_test.sh index 4abf7b4..8889d77 100755 --- a/integration_test.sh +++ b/integration_test.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +rm .env cd external_tools docker-compose stop docker-compose rm -v -f @@ -10,20 +11,28 @@ docker volume rm external_tools_postgres-volume docker-compose pull docker-compose up -d +echo "Started external tools. Now waiting for them to start up." sleep 180 cd .. java -cp external_tools/lang-0.1.0-BUILD-SNAPSHOT.jar org.apache.fineract.cn.lang.security.RsaKeyPairFactory UNIX > .env cat env_variables >> .env +echo "env variables saved into .env" docker-compose stop docker-compose rm -f docker-compose pull docker-compose up -d provisioner-ms +echo "Started provision-ms. Now waiting it to provision (create schema 'seshat' to Postgres and Cassandra)." sleep 180 docker-compose up -d rhythm-ms identity-ms customer-ms accounting-ms deposit-ms portfolio-ms office-ms teller-ms fims-web-app -sleep 180 +echo "Started set of micro services. Now waiting for them to start up" +sleep 240 +echo "Start provisioning the system with Postman scripts." +cd postman_scripts +newman run Fineract-CN-Initial-Requests_PART1.postman_collection.json -e Fineract-Cn-Initial-Setup-Environment.postman_environment.json +echo "Finished." diff --git a/postman_scripts/Fineract-CN-Initial-Requests_PART1.postman_collection.json b/postman_scripts/Fineract-CN-Initial-Requests_PART1.postman_collection.json new file mode 100644 index 0000000..1339a81 --- /dev/null +++ b/postman_scripts/Fineract-CN-Initial-Requests_PART1.postman_collection.json @@ -0,0 +1,2693 @@ +{ + "info": { + "_postman_id": "ada8e456-15a7-4d33-8ccd-79d00130e427", + "name": "Fineract-CN-Initial-Requests_PART1", + "description": "Collection to initialize tenant", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "00.1 Verify eureka is up", + "event": [ + { + "listen": "test", + "script": { + "id": "2a49d9a1-377c-4c03-90b8-1c285140de5a", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://eureka:8761/", + "protocol": "http", + "host": [ + "eureka" + ], + "port": "8761", + "path": [ + "" + ] + }, + "description": "1. Get Token from System-User" + }, + "response": [] + }, + { + "name": "01. Log in root user", + "event": [ + { + "listen": "test", + "script": { + "id": "2a49d9a1-377c-4c03-90b8-1c285140de5a", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"rootUserToken\", jsonData.token);", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/auth/token?grant_type=password&client_id={{client_id}}&username={{rootUser}}&password={{rootUserPassword}}", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "auth", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "client_id", + "value": "{{client_id}}", + "description": "The initial Client Id used for starting service runner\n" + }, + { + "key": "username", + "value": "{{rootUser}}", + "description": "Initial system user \"wepemnefret\"\n" + }, + { + "key": "password", + "value": "{{rootUserPassword}}" + } + ] + }, + "description": "1. Get Token from System-User" + }, + "response": [] + }, + { + "name": "NB! ONLY CREATE apps you have started", + "request": { + "method": "OPTIONS", + "header": [], + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/auth/token", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "auth", + "token" + ] + } + }, + "response": [] + }, + { + "name": "02.01 Create identity-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "fb7299ef-04d4-4869-a25b-d1b523098c6d", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"identity-v1\",\n\t\"description\": \"Identity Service\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{identityUrl}}/identity/v1\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "02.02 Create rhythm-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "4d75f048-905b-41af-b767-4314d5e3a050", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"rhythm-v1\",\n\t\"description\": \"Customer Service\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{rhythmUrl}}/rhythm/v1\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "02.03 Create office-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "bc3eeb3d-961c-449b-87b9-99606d0511b3", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"office-v1\",\n\t\"description\": \"Office Service\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{officeUrl}}/office/v1\"\n}" + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "02.04 Create customer-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "8adf52e4-af8a-49c8-86fc-c3174e637283", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"customer-v1\",\n\t\"description\": \"Customer Service\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{customerUrl}}/customer/v1\"\n}" + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "02.05 Create accounting-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "6a24d7f4-0056-42e6-8d20-c7d3bd3dfd09", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"accounting-v1\",\n\t\"description\": \"Accounting Service\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{accountingUrl}}/accounting/v1\"\n}" + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "02.06 Create portfolio-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "3efb77f8-9bc7-4835-87e8-b4ebfb7abd11", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"portfolio-v1\",\n\t\"description\": \"Portfolio\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{portfolioUrl}}/portfolio/v1\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "02.07 Create deposit-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "870693ae-6f50-4b8e-9920-fa45e184f732", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"deposit-v1\",\n\t\"description\": \"Deposit Management Service\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{depositUrl}}/deposit/v1\"\n}" + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "02.08 Create teller-v1 application", + "event": [ + { + "listen": "test", + "script": { + "id": "0dbc31fb-0e82-492a-aab8-f30e1fdad5a5", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"teller-v1\",\n\t\"description\": \"Teller\",\n\t\"vendor\": \"Apache Fineract\",\n\t\"homepage\": \"http://{{tellerUrl}}/teller/v1\"\n}" + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "03.1 Create first tenant 'playground'", + "event": [ + { + "listen": "test", + "script": { + "id": "0b18908b-f2d4-4ce4-a8ad-3d1c0652a1bc", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"identifier\": \"{{tenantIdentifier}}\",\n\t\"name\": \"Playground\",\n\t\"description\": \"Sample tenant for demonstrating Fineract-CN functionality\",\n\t\"cassandraConnectionInfo\": {\n\t\t\"clusterName\": \"datacenter1\",\n\t\t\"contactPoints\": \"cassandra:9042\",\n\t\t\"keyspace\": \"playground\",\n\t\t\"replicationType\": \"Simple\",\n\t\t\"replicas\": \"1\"\n\t},\n\t\"databaseConnectionInfo\": {\n\t\t\"driverClass\": \"org.postgresql.Driver\",\n\t\t\"databaseNa [...] + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants" + ] + } + }, + "response": [] + }, + { + "name": "03.2 Assign identity-v1 for Tenant and obtain Tenant Admin (user antony) Password", + "event": [ + { + "listen": "test", + "script": { + "id": "206c2d92-7c20-46e9-8079-ead0c0adbbe0", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"antonyUserPassword\", jsonData.adminPassword);", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"identity-v1\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/identityservice", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "identityservice" + ] + } + }, + "response": [] + }, + { + "name": "03.3 Login Antony (tenant superadmin) with obtained password", + "event": [ + { + "listen": "test", + "script": { + "id": "b3b88517-d738-461b-ba9a-f57e872dfcb2", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"antonyToken\", jsonData.accessToken);", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/token?grant_type=password&username={{antonyUser}}&password={{antonyUserPassword}}", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "username", + "value": "{{antonyUser}}" + }, + { + "key": "password", + "value": "{{antonyUserPassword}}" + } + ] + } + }, + "response": [] + }, + { + "name": "03.4 Change Antony Password to 'antonyPassword'", + "event": [ + { + "listen": "test", + "script": { + "id": "4a97cc02-4f7f-4a0d-b805-5ec4af08f7b0", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "", + "var delay3seconds = setTimeout(function(){}, [3000]);", + "", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "eaa4397b-8b4a-4032-914a-2408cf82ea4b", + "exec": [ + "var CryptoJS = require(\"crypto-js\")", + "var rawStr = CryptoJS.enc.Utf8.parse(\"antonyUserPassword\")", + "var base64 = CryptoJS.enc.Base64.stringify(rawStr)", + "console.log(`antonyUserPassword as BASE64: ${base64}`)", + "postman.setEnvironmentVariable(\"antonyUserPassword\", base64);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{antonyToken}}" + }, + { + "key": "User", + "value": "{{antonyUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"password\": \"{{antonyUserPassword}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/users/antony/password", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "users", + "antony", + "password" + ] + } + }, + "response": [] + }, + { + "name": "03.5 LOGIN ANTONY (tenant SuperAdmin) with pwd 'antonyPassword'", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"antonyToken\", jsonData.accessToken);", + "", + "", + "" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/token?grant_type=password&username=antony&password={{antonyUserPassword}}", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "username", + "value": "antony" + }, + { + "key": "password", + "value": "{{antonyUserPassword}}" + } + ] + } + }, + "response": [] + }, + { + "name": "04.01 Assign rhythm-v1 for Tenant", + "event": [ + { + "listen": "test", + "script": { + "id": "ba66d4b9-95a1-45de-9d59-d54308c72273", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay90seconds = setTimeout(function(){}, [90000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"name\": \"rhythm-v1\"\n\t}\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "04.02 Assign office-v1 for Tenant", + "event": [ + { + "listen": "test", + "script": { + "id": "7f3f5ba7-5b63-4a44-b491-12e0436c1056", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay20seconds = setTimeout(function(){}, [20000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"name\": \"office-v1\"\n\t}\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "04.03 Assign customer-v1 for Tenant", + "event": [ + { + "listen": "test", + "script": { + "id": "d5f166cb-0a4d-44e2-ab41-fde67c2d1af7", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay20seconds = setTimeout(function(){}, [20000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"name\": \"customer-v1\"\n\t}\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "05.1 Create administrator role for tenant \"playground\"", + "event": [ + { + "listen": "test", + "script": { + "id": "c64b529c-6e8a-4ef1-ab0d-a58b9499ade9", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "setTimeout(function(){}, [3000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "User", + "value": "{{antonyUser}}" + }, + { + "key": "Authorization", + "value": "{{antonyToken}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"administrator\",\n \"permissions\": [\n {\n \"permittableEndpointGroupIdentifier\": \"accounting__v1__account\",\n \"allowedOperations\": [\n \"READ\",\n \"CHANGE\",\n \"DELETE\"\n ]\n },\n {\n \"permittableEndpointGroupIdentifier\": \"accounting__v1__fin_condition\",\n \"allowedOperations\": [\n \"READ\",\n \"CHANGE\",\n \"DELETE\"\n ]\n },\n {\n \"permittable [...] + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/roles", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "roles" + ] + } + }, + "response": [] + }, + { + "name": "05.2 Create Admin User operator with password 'initialPassword'", + "event": [ + { + "listen": "test", + "script": { + "id": "9486d316-2aca-409a-88ff-f17770249dca", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay90seconds = setTimeout(function(){}, [2000]);", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "115a549d-513d-46ef-b8af-f9be111bd55d", + "exec": [ + "var CryptoJS = require(\"crypto-js\")", + "var rawStr = CryptoJS.enc.Utf8.parse(\"initialPassword\")", + "var base64 = CryptoJS.enc.Base64.stringify(rawStr)", + "console.log(`operatorPassword in BASE64: ${base64}`)", + "postman.setEnvironmentVariable(\"adminUserPassword\", base64);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{antonyToken}}" + }, + { + "key": "User", + "value": "{{antonyUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"identifier\": \"operator\",\n\t\"role\": \"administrator\",\n\t\"password\": \"{{adminUserPassword}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/users", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "users" + ] + } + }, + "response": [] + }, + { + "name": "05.3 Log in with initial password", + "event": [ + { + "listen": "test", + "script": { + "id": "90d180ba-a4a4-47ce-b018-94c75b0ebe65", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"adminUserToken\", jsonData.accessToken);", + "", + "const moment = require('moment');", + "var timestamp = moment().format(\"YYYY-MM-DD\") + \"T\" + moment().format(\"HH:mm:ss\");", + "tests[\"initial password is expired\"] = jsonData.passwordExpiration < timestamp;", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0f7bafa6-8124-42cc-b0a4-9571119a5fc8", + "exec": [ + "var delay3seconds = setTimeout(function(){}, [3000]);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{antonyToken}}" + }, + { + "key": "User", + "value": "{{antonyUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/token?grant_type=password&username=operator&password={{adminUserPassword}}", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "username", + "value": "operator" + }, + { + "key": "password", + "value": "{{adminUserPassword}}", + "description": "Initial password" + } + ] + } + }, + "response": [] + }, + { + "name": "05.4 Change user 'operator' password to 'operatorPassword'", + "event": [ + { + "listen": "test", + "script": { + "id": "af5b9059-bf36-4715-acc2-25d272552590", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay90seconds = setTimeout(function(){}, [2000]);", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "91312a48-c2bd-4ea4-b4e6-8c388aec99e9", + "exec": [ + "var CryptoJS = require(\"crypto-js\")", + "var rawStr = CryptoJS.enc.Utf8.parse(\"operatorPassword\")", + "var base64 = CryptoJS.enc.Base64.stringify(rawStr)", + "console.log(`operatorPassword in BASE64: ${base64}`)", + "postman.setEnvironmentVariable(\"adminUserPassword\", base64);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "type": "text", + "value": "{{adminUser}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"password\": \"{{adminUserPassword}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/users/operator/password", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "users", + "operator", + "password" + ] + } + }, + "response": [] + }, + { + "name": "05.5 LOG IN TENANT ADMIN (operator)", + "event": [ + { + "listen": "test", + "script": { + "id": "c8802a96-df5a-4916-b6fb-e27b33c386e6", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"adminUserToken\", jsonData.accessToken);", + "", + "const moment = require('moment');", + "var timestamp = moment().format(\"YYYY-MM-DD\") + \"T\" + moment().format(\"HH:mm:ss\");", + "tests[\"password is not expired\"] = jsonData.passwordExpiration > timestamp;", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{}" + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/token?grant_type=password&username=operator&password={{adminUserPassword}}", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "username", + "value": "operator" + }, + { + "key": "password", + "value": "{{adminUserPassword}}" + } + ] + } + }, + "response": [] + }, + { + "name": "05.6 Pull operator permissions", + "event": [ + { + "listen": "test", + "script": { + "id": "9486d316-2aca-409a-88ff-f17770249dca", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "115a549d-513d-46ef-b8af-f9be111bd55d", + "exec": [ + "var CryptoJS = require(\"crypto-js\")", + "var rawStr = CryptoJS.enc.Utf8.parse(\"operatorPassword\")", + "var base64 = CryptoJS.enc.Base64.stringify(rawStr)", + "console.log(`operatorPassword in BASE64: ${base64}`)", + "postman.setEnvironmentVariable(\"adminUserPassword\", base64);" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "value": "{{adminUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/users/operator/permissions", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "users", + "operator", + "permissions" + ] + } + }, + "response": [] + }, + { + "name": "06.1 Create Scheduler role for tenant playground", + "event": [ + { + "listen": "test", + "script": { + "id": "c64b529c-6e8a-4ef1-ab0d-a58b9499ade9", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay90seconds = setTimeout(function(){}, [2000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "User", + "value": "{{antonyUser}}" + }, + { + "key": "Authorization", + "value": "{{antonyToken}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"scheduler\",\n \"permissions\": [\n {\n \"permittableEndpointGroupIdentifier\": \"identity__v1__app_self\",\n \"allowedOperations\": [\n \"CHANGE\"\n ]\n },\n {\n \"permittableEndpointGroupIdentifier\": \"portfolio__v1__khepri\",\n \"allowedOperations\": [\n \"CHANGE\"\n ]\n }\n ]\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/roles", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "roles" + ] + } + }, + "response": [] + }, + { + "name": "06.2 Create Scheduler user imhotep with password 'initialImhotepPassword'", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "3469215d-1ba4-4891-aa3f-e45e343ab4de", + "exec": [ + "var CryptoJS = require(\"crypto-js\")", + "", + "//Encrypt", + "var rawStr = CryptoJS.enc.Utf8.parse(\"initialImhotepPassword\")", + "var base64 = CryptoJS.enc.Base64.stringify(rawStr)", + "console.log(`imhotepPassword in BASE64: ${base64}`)", + "postman.setEnvironmentVariable(\"schedulerUserPassword\", base64);", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "1cad925a-87b3-4ba2-af86-a4d499d68f22", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "setTimeout(function(){}, [3000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{antonyToken}}" + }, + { + "key": "User", + "value": "{{antonyUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"identifier\": \"imhotep\",\n\t\"role\": \"scheduler\",\n\t\"password\": \"{{schedulerUserPassword}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/users", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "users" + ] + } + }, + "response": [] + }, + { + "name": "06.3 Login Scheduler user imhotep", + "event": [ + { + "listen": "test", + "script": { + "id": "272b3e2a-f1b2-41da-aa5d-9e017555d6d2", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "tests[\"access token was returned \"] = jsonData.accessToken !== undefined;", + "", + "postman.setEnvironmentVariable(\"schedulerUserToken\", jsonData.accessToken);", + "", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "dd4a949c-cf1e-4385-aa25-3cb53d39d56d", + "exec": [ + "var delay3seconds = setTimeout(function(){}, [3000]);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/token?grant_type=password&username=imhotep&password={{schedulerUserPassword}}", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "username", + "value": "imhotep" + }, + { + "key": "password", + "value": "{{schedulerUserPassword}}" + } + ] + } + }, + "response": [] + }, + { + "name": "06.4 Change imhotep user password to 'imhotepPassword'", + "event": [ + { + "listen": "test", + "script": { + "id": "af5b9059-bf36-4715-acc2-25d272552590", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay2seconds = setTimeout(function(){}, [2000]);", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0198f255-d555-4a77-8825-04c5bbd1c54d", + "exec": [ + "var CryptoJS = require(\"crypto-js\")", + "", + "//Encrypt", + "var rawStr = CryptoJS.enc.Utf8.parse(\"imhotepPassword\")", + "var base64 = CryptoJS.enc.Base64.stringify(rawStr)", + "console.log(`imhotepPassword in BASE64: ${base64}`)", + "postman.setEnvironmentVariable(\"schedulerUserPassword\", base64);", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "Authorization", + "value": "{{schedulerUserToken}}", + "type": "text" + }, + { + "key": "User", + "value": "imhotep", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"password\": \"{{schedulerUserPassword}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/users/imhotep/password", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "users", + "imhotep", + "password" + ] + } + }, + "response": [] + }, + { + "name": "06.5 Login user imhotep (who has scheduler role)", + "event": [ + { + "listen": "test", + "script": { + "id": "5830a8cd-f000-4b41-bfd2-1ac8c96812e4", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"schedulerUserToken\", jsonData.accessToken);", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/token?grant_type=password&username=imhotep&password={{schedulerUserPassword}}", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "password" + }, + { + "key": "username", + "value": "imhotep" + }, + { + "key": "password", + "value": "{{schedulerUserPassword}}" + } + ] + } + }, + "response": [] + }, + { + "name": "06.6 enable permission identity__v1__app_self for imhotep", + "event": [ + { + "listen": "test", + "script": { + "id": "5830a8cd-f000-4b41-bfd2-1ac8c96812e4", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "User", + "value": "imhotep", + "type": "text" + }, + { + "key": "Authorization", + "value": "{{schedulerUserToken}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "true", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/applications/rhythm-v1/permissions/identity__v1__app_self/users/imhotep/enabled", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "applications", + "rhythm-v1", + "permissions", + "identity__v1__app_self", + "users", + "imhotep", + "enabled" + ] + } + }, + "response": [] + }, + { + "name": "07.01 Assign accounting-v1 for Tenant", + "event": [ + { + "listen": "test", + "script": { + "id": "af1b9ac1-c66c-4353-b59b-ec3e1bea864c", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay90seconds = setTimeout(function(){}, [90000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"name\": \"accounting-v1\"\n\t}\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "07.020 Assign portfolio-v1 for Tenant", + "event": [ + { + "listen": "test", + "script": { + "id": "ef7b5c59-1623-4183-8196-b76e30922713", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay90seconds = setTimeout(function(){}, [90000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"name\": \"portfolio-v1\"\n\t}\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "07.022 enable permission portfolio__v1__khepri for user imhotep", + "event": [ + { + "listen": "test", + "script": { + "id": "5830a8cd-f000-4b41-bfd2-1ac8c96812e4", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "User", + "value": "imhotep", + "type": "text" + }, + { + "key": "Authorization", + "value": "{{schedulerUserToken}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "true", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://{{identityUrl}}/identity/v1/applications/rhythm-v1/permissions/portfolio__v1__khepri/users/imhotep/enabled", + "protocol": "http", + "host": [ + "{{identityUrl}}" + ], + "path": [ + "identity", + "v1", + "applications", + "rhythm-v1", + "permissions", + "portfolio__v1__khepri", + "users", + "imhotep", + "enabled" + ] + } + }, + "response": [] + }, + { + "name": "07.03 Assign deposits for Tenant", + "event": [ + { + "listen": "test", + "script": { + "id": "8b4e42c3-5a2f-437d-8f2c-55a6d398f601", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "var delay90seconds = setTimeout(function(){}, [90000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"name\": \"deposit-v1\"\n\t}\n]" + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "07.04 Assign teller-v1 for Tenant", + "event": [ + { + "listen": "test", + "script": { + "id": "99d87103-9033-4dc9-aaef-b82aef6f8e3a", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Authorization", + "value": "{{rootUserToken}}" + }, + { + "key": "User", + "value": "{{rootUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\t{\n\t\t\"name\": \"teller-v1\"\n\t}\n]" + }, + "url": { + "raw": "http://{{provisionerUrl}}/provisioner/v1/tenants/{{tenantIdentifier}}/applications", + "protocol": "http", + "host": [ + "{{provisionerUrl}}" + ], + "path": [ + "provisioner", + "v1", + "tenants", + "{{tenantIdentifier}}", + "applications" + ] + } + }, + "response": [] + }, + { + "name": "08.1 Create REVENUE ledgers", + "event": [ + { + "listen": "test", + "script": { + "id": "6260a2d4-def6-40e4-a87e-38f3d01f16b3", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "value": "{{adminUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": null,\n \"type\": \"REVENUE\",\n \"identifier\": \"1000\",\n \"name\": \"Income\",\n \"subLedgers\": [\n {\n \"description\": null,\n \"type\": \"REVENUE\",\n \"identifier\": \"1100\",\n \"name\": \"Income from Loans\",\n \"subLedgers\": [],\n \"showAccountsInChart\": true\n },\n {\n \"description\": null,\n \"type\": \"REVENUE\",\n \"identifier\": \"1200\",\n \"name\": \"Investment Income\" [...] + }, + "url": { + "raw": "http://{{accountingUrl}}/accounting/v1/ledgers", + "protocol": "http", + "host": [ + "{{accountingUrl}}" + ], + "path": [ + "accounting", + "v1", + "ledgers" + ] + } + }, + "response": [] + }, + { + "name": "08.2 Create EXPENSE Ledgers", + "event": [ + { + "listen": "test", + "script": { + "id": "be1a9019-cb18-4084-802b-cc6169e0b091", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "value": "{{adminUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": null,\n \"type\": \"EXPENSE\",\n \"identifier\": \"2000\",\n \"name\": \"Expenses\",\n \"showAccountsInChart\": true,\n \"subLedgers\": [\n {\"description\": null, \"type\": \"EXPENSE\", \"identifier\": \"2100\", \"name\": \"Employee Compensation\", \"subLedgers\": [], \"showAccountsInChart\": true },\n {\"description\": null, \"type\": \"EXPENSE\", \"identifier\": \"2200\", \"name\": \"Employee Benefits\", \"subLedgers\": [], \"showAccount [...] + }, + "url": { + "raw": "http://{{accountingUrl}}/accounting/v1/ledgers", + "protocol": "http", + "host": [ + "{{accountingUrl}}" + ], + "path": [ + "accounting", + "v1", + "ledgers" + ] + } + }, + "response": [] + }, + { + "name": "08.3 Create ASSETS ledgers", + "event": [ + { + "listen": "test", + "script": { + "id": "3585bd0e-9598-43e6-b678-645bd64855dd", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "value": "{{adminUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": null,\n \"type\": \"ASSET\",\n \"identifier\": \"7000\",\n \"name\": \"Assets\",\n \"showAccountsInChart\": true,\n \"subLedgers\": [\n {\n \"description\": null,\n \"type\": \"ASSET\",\n \"identifier\": \"7010\",\n \"name\": \"Loans to Members\",\n \"subLedgers\": [],\n \"showAccountsInChart\": true\n },\n {\n \"description\": null,\n \"type\": \"ASSET\",\n \"identifier\": \"7020\",\n \"na [...] + }, + "url": { + "raw": "http://{{accountingUrl}}/accounting/v1/ledgers", + "protocol": "http", + "host": [ + "{{accountingUrl}}" + ], + "path": [ + "accounting", + "v1", + "ledgers" + ] + } + }, + "response": [] + }, + { + "name": "08.4 Create LIABILITY ledgers", + "event": [ + { + "listen": "test", + "script": { + "id": "708e63ea-73ac-4c20-a92d-915fba3135f6", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "value": "{{adminUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": null,\n \"type\": \"LIABILITY\",\n \"identifier\": \"8000\",\n \"name\": \"Accounts Payable\",\n \"showAccountsInChart\": true,\n \"subLedgers\": [\n {\n \"description\": null,\n \"type\": \"LIABILITY\",\n \"identifier\": \"8100\",\n \"name\": \"Accounts Payable\",\n \"subLedgers\": [],\n \"showAccountsInChart\": true\n },\n {\n \"description\": null,\n \"type\": \"LIABILITY\",\n \"identifier\": [...] + }, + "url": { + "raw": "http://{{accountingUrl}}/accounting/v1/ledgers", + "protocol": "http", + "host": [ + "{{accountingUrl}}" + ], + "path": [ + "accounting", + "v1", + "ledgers" + ] + } + }, + "response": [] + }, + { + "name": "08.5 Create EQUITY ledgers", + "event": [ + { + "listen": "test", + "script": { + "id": "e240003c-12d2-492c-bf43-970ed16564d5", + "exec": [ + "tests[\"Status code is 202\"] = responseCode.code === 202;", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "value": "{{adminUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"description\": null,\n \"type\": \"EQUITY\",\n \"identifier\": \"9000\",\n \"name\": \"Equity\",\n \"showAccountsInChart\": true,\n \"subLedgers\": [\n {\n \"description\": null,\n \"type\": \"EQUITY\",\n \"identifier\": \"9100\",\n \"name\": \"Member Savings\",\n \"subLedgers\": [],\n \"showAccountsInChart\": true\n },\n {\n \"description\": null,\n \"type\": \"EQUITY\",\n \"identifier\": \"9300\",\n \"n [...] + }, + "url": { + "raw": "http://{{accountingUrl}}/accounting/v1/ledgers", + "protocol": "http", + "host": [ + "{{accountingUrl}}" + ], + "path": [ + "accounting", + "v1", + "ledgers" + ] + } + }, + "response": [] + }, + { + "name": "08.6 Assert ledgers created", + "event": [ + { + "listen": "test", + "script": { + "id": "e240003c-12d2-492c-bf43-970ed16564d5", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var jsonData = JSON.parse(responseBody);", + "tests[\"There are 84 accounts\"] = jsonData.totalElements === 5;", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "bd18e656-94f9-4c09-94df-69becea56213", + "exec": [ + "var delay3seconds = setTimeout(function(){}, [3000]);", + "" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "{{adminUserToken}}" + }, + { + "key": "User", + "value": "{{adminUser}}" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-Tenant-Identifier", + "value": "{{tenantIdentifier}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "http://{{accountingUrl}}/accounting/v1/ledgers", + "protocol": "http", + "host": [ + "{{accountingUrl}}" + ], + "path": [ + "accounting", + "v1", + "ledgers" + ] + } + }, + "response": [] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "ab95cd30-13ab-41bc-a153-9c3625d46c11", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "7e7f5c21-17f8-46e4-a2ab-c2367357569d", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {} +} \ No newline at end of file
