-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
...st/features/NewMod3/flows/activatePaymentNotice/activatePaymentNotice_IDMP_ACT_10.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
Feature: semantic check for activatePaymentNotice regarding idempotency | ||
|
||
Background: | ||
Given systems up | ||
And nodo-dei-pagamenti has config parameter useIdempotency set to true | ||
|
||
Scenario: Execute activatePaymentNotice request | ||
Given initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>#idempotency_key#</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>#creditor_institution_code_old#</fiscalCode> | ||
<noticeNumber>#notice_number_old#</noticeNumber> | ||
</qrCode> | ||
<expirationTime>2000</expirationTime> | ||
<amount>10.00</amount> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is OK of activatePaymentNotice response | ||
|
||
Scenario: Execute activatePaymentNotice1 request | ||
Given the Execute activatePaymentNotice request scenario executed successfully | ||
And PSP waits 4 seconds for expiration | ||
And initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>$activatePaymentNotice.idempotencyKey</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>$activatePaymentNotice.fiscalCode</fiscalCode> | ||
<noticeNumber>$activatePaymentNotice.noticeNumber</noticeNumber> | ||
</qrCode> | ||
<amount>10.00</amount> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is KO of activatePaymentNotice response | ||
And check faultCode is PPT_PAGAMENTO_IN_CORSO of activatePaymentNotice response | ||
|
||
#DB check | ||
Scenario: DB check1 | ||
Given the Execute activatePaymentNotice request scenario executed successfully | ||
And check datetime plus number of date 0 of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice.fiscalCode of the record at column PA_FISCAL_CODE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value activatePaymentNotice of the record at column PRIMITIVA of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice.idPSP of the record at column PSP_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice.noticeNumber of the record at column NOTICE_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice.idempotencyKey of the record at column IDEMPOTENCY_KEY of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNoticeResponse.paymentToken of the record at column TOKEN of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column HASH_REQUEST of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column RESPONSE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column INSERTED_TIMESTAMP of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3 |