Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-coverage: create tests for adding participant to ALS #91

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 56 additions & 25 deletions docker/ml-testing-toolkit/test-cases/collections/tests/p2p.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
},
"fileInfo": {
"path": "hub/golden_path/feature_tests/p2p_money_transfer/p2p_happy_path.json",
"labels": [
"p2p"
]
"labels": ["p2p"]
},
"requests": [
{
Expand Down Expand Up @@ -44,7 +42,54 @@
"fspId": "{$inputs.toFspId}",
"currency": "{$inputs.currency}"
},
"url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}"
"url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}",
"tests": {
"assertions": [
{
"id": 1,
"description": "Response status to be 202",
"exec": ["expect(response.status).to.equal(202)"]
},
{
"id": 2,
"description": "Response statusText to be Accepted",
"exec": ["expect(response.statusText).to.equal('Accepted')"]
},
{
"id": 3,
"description": "Callback Content Length not 0",
"exec": [
"expect(callback.headers['Content-Length']).to.not.equal('0')"
]
},
{
"id": 4,
"description": "Callback FSP Destination equal to request FSP Source",
"exec": [
"expect(callback.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')"
]
},
{
"id": 6,
"description": "Callback body should have no error",
"exec": [
"expect(callback.body).to.not.have.property('errorInformation')"
]
},
{
"id": 7,
"description": "Callback currency to match the request",
"exec": [
"expect(callback.body.currency).to.equal('{$request.body.currency}')"
]
},
{
"id": 8,
"description": "Callback body to have partyList",
"exec": ["expect(callback.body).to.have.property('partyList')"]
}
]
}
},
{
"id": 3,
Expand Down Expand Up @@ -76,16 +121,12 @@
{
"id": 1,
"description": "Response status to be 202",
"exec": [
"expect(response.status).to.equal(202)"
]
"exec": ["expect(response.status).to.equal(202)"]
},
{
"id": 2,
"description": "Response statusText be Accepted",
"exec": [
"expect(response.statusText).to.equal('Accepted')"
]
"exec": ["expect(response.statusText).to.equal('Accepted')"]
},
{
"id": 3,
Expand All @@ -97,9 +138,7 @@
{
"id": 4,
"description": "Callback body should contain party",
"exec": [
"expect(callback.body).to.have.property('party')"
]
"exec": ["expect(callback.body).to.have.property('party')"]
},
{
"id": 5,
Expand Down Expand Up @@ -217,16 +256,12 @@
{
"id": 1,
"description": "Response status to be 202",
"exec": [
"expect(response.status).to.equal(202)"
]
"exec": ["expect(response.status).to.equal(202)"]
},
{
"id": 2,
"description": "Response statusText be Accepted",
"exec": [
"expect(response.statusText).to.equal('Accepted')"
]
"exec": ["expect(response.statusText).to.equal('Accepted')"]
},
{
"id": 3,
Expand Down Expand Up @@ -348,16 +383,12 @@
{
"id": 1,
"description": "Response status to be 202",
"exec": [
"expect(response.status).to.equal(202)"
]
"exec": ["expect(response.status).to.equal(202)"]
},
{
"id": 2,
"description": "Response statusText be Accepted",
"exec": [
"expect(response.statusText).to.equal('Accepted')"
]
"exec": ["expect(response.statusText).to.equal('Accepted')"]
},
{
"id": 3,
Expand Down