generated from pagopa/pagopa-functions-template
-
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.
[PRDP-127] Cleaned & updated integration tests - changed main package…
… name
- Loading branch information
Showing
74 changed files
with
195 additions
and
288 deletions.
There are no files selected for viewing
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
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
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
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
48 changes: 24 additions & 24 deletions
48
integration-test/src/features/receipt_pdf_datastore.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 |
---|---|---|
@@ -1,44 +1,44 @@ | ||
Feature: All about payment events consumed by Azure functions receipt-pdf-datastore | ||
Feature: All about payment events consumed by Azure functions receipt-pdf-generator | ||
|
||
Scenario: a biz event stored on biz-events datastore is stored into receipts datastore | ||
Given a random biz event with id "receipt-datastore-int-test-id-1" stored on biz-events datastore with status DONE | ||
When biz event has been properly stored into receipt datastore after 10000 ms with eventId "receipt-datastore-int-test-id-1" | ||
Then the receipts datastore returns the receipt | ||
And the receipt has eventId "receipt-datastore-int-test-id-1" | ||
Scenario: a biz event stored on biz-events generator is stored into receipts generator | ||
Given a random biz event with id "receipt-generator-int-test-id-1" stored on biz-events generator with status DONE | ||
When biz event has been properly stored into receipt generator after 10000 ms with eventId "receipt-generator-int-test-id-1" | ||
Then the receipts generator returns the receipt | ||
And the receipt has eventId "receipt-generator-int-test-id-1" | ||
And the receipt has not the status "NOT_QUEUE_SENT" | ||
|
||
Scenario: a biz event enqueued on receipts queue trigger the PDF receipt generation that is stored on receipts datastore and blob storage | ||
Given a receipt with id "receipt-datastore-int-test-id-2" stored into receipt datastore | ||
And a random biz event with id "receipt-datastore-int-test-id-2" enqueued on receipts queue | ||
Scenario: a biz event enqueued on receipts queue trigger the PDF receipt generation that is stored on receipts generator and blob storage | ||
Given a receipt with id "receipt-generator-int-test-id-2" stored into receipt generator | ||
And a random biz event with id "receipt-generator-int-test-id-2" enqueued on receipts queue | ||
When the PDF receipt has been properly generate from biz event after 20000 ms | ||
Then the receipts datastore returns the receipt | ||
And the receipt has eventId "receipt-datastore-int-test-id-2" | ||
Then the receipts generator returns the receipt | ||
And the receipt has eventId "receipt-generator-int-test-id-2" | ||
And the receipt has not the status "NOT_QUEUE_SENT" | ||
And the receipt has not the status "INSERTED" | ||
And the blob storage has the PDF document | ||
|
||
Scenario: a biz event enqueued on receipts poison queue is enqueued on receipt queue that trigger the PDF receipt generation | ||
Given a receipt with id "receipt-datastore-int-test-id-3" stored into receipt datastore | ||
And a random biz event with id "receipt-datastore-int-test-id-3" enqueued on receipts poison queue with poison retry "false" | ||
Given a receipt with id "receipt-generator-int-test-id-3" stored into receipt generator | ||
And a random biz event with id "receipt-generator-int-test-id-3" enqueued on receipts poison queue with poison retry "false" | ||
When the PDF receipt has been properly generate from biz event after 20000 ms | ||
Then the receipts datastore returns the receipt | ||
And the receipt has eventId "receipt-datastore-int-test-id-3" | ||
Then the receipts generator returns the receipt | ||
And the receipt has eventId "receipt-generator-int-test-id-3" | ||
And the receipt has not the status "NOT_QUEUE_SENT" | ||
And the receipt has not the status "INSERTED" | ||
And the blob storage has the PDF document | ||
|
||
Scenario: a biz event enqueued on receipts poison queue is stored on receipt-message-error datastore | ||
Given a random biz event with id "receipt-datastore-int-test-id-4" enqueued on receipts poison queue with poison retry "true" | ||
When the biz event has been properly stored on receipt-message-error datastore after 20000 ms | ||
Then the receipt-message-error datastore returns the error receipt | ||
Scenario: a biz event enqueued on receipts poison queue is stored on receipt-message-error generator | ||
Given a random biz event with id "receipt-generator-int-test-id-4" enqueued on receipts poison queue with poison retry "true" | ||
When the biz event has been properly stored on receipt-message-error generator after 20000 ms | ||
Then the receipt-message-error generator returns the error receipt | ||
And the error receipt has the status "TO_REVIEW" | ||
|
||
Scenario: a biz event stored on receipt-message-error datastore is enqueued on receipt queue that trigger the PDF receipt generation | ||
Given a receipt with id "receipt-datastore-int-test-id-5" stored into receipt datastore | ||
And a error receipt with id "receipt-datastore-int-test-id-5" stored into receipt-message-error datastore with status REVIEWED | ||
Scenario: a biz event stored on receipt-message-error generator is enqueued on receipt queue that trigger the PDF receipt generation | ||
Given a receipt with id "receipt-generator-int-test-id-5" stored into receipt generator | ||
And a error receipt with id "receipt-generator-int-test-id-5" stored into receipt-message-error generator with status REVIEWED | ||
When the PDF receipt has been properly generate from biz event after 20000 ms | ||
Then the receipts datastore returns the receipt | ||
And the receipt has eventId "receipt-datastore-int-test-id-5" | ||
Then the receipts generator returns the receipt | ||
And the receipt has eventId "receipt-generator-int-test-id-5" | ||
And the receipt has not the status "NOT_QUEUE_SENT" | ||
And the receipt has not the status "INSERTED" | ||
And the blob storage has the PDF document |
41 changes: 0 additions & 41 deletions
41
integration-test/src/step_definitions/biz_events_datastore_client.js
This file was deleted.
Oops, something went wrong.
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
9 changes: 0 additions & 9 deletions
9
src/main/java/it/gov/pagopa/receipt/pdf/datastore/client/PdfEngineClient.java
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
src/main/java/it/gov/pagopa/receipt/pdf/datastore/client/ReceiptCosmosClient.java
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
src/main/java/it/gov/pagopa/receipt/pdf/datastore/entity/event/enumeration/WalletType.java
This file was deleted.
Oops, something went wrong.
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
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
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
9 changes: 9 additions & 0 deletions
9
src/main/java/it/gov/pagopa/receipt/pdf/generator/client/PdfEngineClient.java
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,9 @@ | ||
package it.gov.pagopa.receipt.pdf.generator.client; | ||
|
||
import it.gov.pagopa.receipt.pdf.generator.model.request.PdfEngineRequest; | ||
import it.gov.pagopa.receipt.pdf.generator.model.response.PdfEngineResponse; | ||
|
||
public interface PdfEngineClient { | ||
|
||
PdfEngineResponse generatePDF(PdfEngineRequest pdfEngineRequest); | ||
} |
4 changes: 2 additions & 2 deletions
4
...f/datastore/client/ReceiptBlobClient.java → ...f/generator/client/ReceiptBlobClient.java
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
9 changes: 9 additions & 0 deletions
9
src/main/java/it/gov/pagopa/receipt/pdf/generator/client/ReceiptCosmosClient.java
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,9 @@ | ||
package it.gov.pagopa.receipt.pdf.generator.client; | ||
|
||
import it.gov.pagopa.receipt.pdf.generator.entity.receipt.Receipt; | ||
import it.gov.pagopa.receipt.pdf.generator.exception.ReceiptNotFoundException; | ||
|
||
public interface ReceiptCosmosClient { | ||
|
||
Receipt getReceiptDocument(String receiptId) throws ReceiptNotFoundException; | ||
} |
2 changes: 1 addition & 1 deletion
2
.../datastore/client/ReceiptQueueClient.java → .../generator/client/ReceiptQueueClient.java
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
12 changes: 6 additions & 6 deletions
12
...tore/client/impl/PdfEngineClientImpl.java → ...ator/client/impl/PdfEngineClientImpl.java
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
Oops, something went wrong.