-
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.
Merge pull request #47 from pagopa/SLS-16
[SLS-16] Configured docker compose - mock clients - e2e tests
- Loading branch information
Showing
24 changed files
with
4,625 additions
and
236 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ASSERTION_CLIENT_MOCK_ENABLED = true | ||
IDP_CLIENT_MOCK_ENABLED = true | ||
IDP_CLIENT_BASE_URI = "http://localhost:3001" | ||
LOLLIPOP_ASSERTION_NOT_BEFORE_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'" | ||
LOLLIPOP_ASSERTION_INSTANT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: "3.9" | ||
services: | ||
web: | ||
build: . | ||
ports: | ||
- "8080:8080" | ||
environment: | ||
##Client mocks config | ||
ASSERTION_CLIENT_MOCK_ENABLED: ${ASSERTION_CLIENT_MOCK_ENABLED} | ||
IDP_CLIENT_MOCK_ENABLED: ${IDP_CLIENT_MOCK_ENABLED} | ||
|
||
##General Lollipop Configs Sample | ||
LOLLIPOP_ASSERTION_EXPIRE_IN_DAYS: ${LOLLIPOP_ASSERTION_EXPIRE_IN_DAYS:-180} | ||
LOLLIPOP_EXPECTED_LC_ORIGINAL_URL: ${LOLLIPOP_EXPECTED_LC_ORIGINAL_URL:-https://api-app.io.pagopa.it/first-lollipop/sign} | ||
LOLLIPOP_EXPECTED_LC_ORIGINAL_METHOD: ${LOLLIPOP_EXPECTED_LC_ORIGINAL_METHOD:-POST} | ||
LOLLIPOP_ASSERTION_NOT_BEFORE_DATE_FORMAT: ${LOLLIPOP_ASSERTION_NOT_BEFORE_DATE_FORMAT:-yyyy-MM-dd'T'HH:mm:ss.SSS'Z'} | ||
LOLLIPOP_ASSERTION_INSTANT_DATE_FORMAT: ${LOLLIPOP_ASSERTION_INSTANT_DATE_FORMAT:-yyyy-MM-dd'T'HH:mm:ss.SSS'Z'} | ||
|
||
###Idp Client Configs | ||
IDP_CLIENT_CIEID: ${IDP_CLIENT_CIEID:-https://idserver.servizicie.interno.gov.it/idp/profile/SAML2/POST/SSO} | ||
IDP_CLIENT_BASE_URI: ${IDP_CLIENT_BASE_URI:-https://api.is.eng.pagopa.it} | ||
IDP_CLIENT_CIE_ENDPOINT: ${IDP_CLIENT_CIE_ENDPOINT:-/idp-keys/cie} | ||
IDP_CLIENT_SPID_ENDPOINT: ${IDP_CLIENT_SPID_ENDPOINT:-/idp-keys/spid} | ||
|
||
###Idp Storage Configs | ||
IDP_STORAGE_ENABLED: ${IDP_STORAGE_ENABLED:-true} | ||
IDP_STORAGE_EVICTION_DELAY: ${IDP_STORAGE_EVICTION_DELAY:-1} | ||
|
||
##Assertion Client Configs | ||
ASSERTION_REST_URI: ${ASSERTION_REST_URI:-http://localhost:3000} | ||
ASSERTION_REST_ENDPOINT: ${ASSERTION_REST_ENDPOINT:-/assertions} | ||
|
||
##Assertion Storage Configs | ||
ASSERTION_STORAGE_ENABLED: ${ASSERTION_STORAGE_ENABLED:-true} | ||
ASSERTION_STORAGE_EVICTION_DELAY: ${ASSERTION_STORAGE_EVICTION_DELAY:-1} | ||
|
||
|
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,18 @@ | ||
const newman = require('newman'); | ||
|
||
newman.run({ | ||
collection: require('./collections/LollipopSDKTest.postman_collection.json'), | ||
environment: './env/Lollipop environment variables.postman_environment.json', | ||
reporters: ['cli', 'htmlextra'], | ||
bail: true | ||
}, function (err, summary) { | ||
if (err) { throw err; } | ||
if(summary?.run?.error){ throw 'collection run encountered an error.';} | ||
|
||
if(summary?.run?.failures?.length > 0){ | ||
const errors = summary.run.failures; | ||
throw `following collection tests failed: ${errors.map((er) => `\n${er.source.name}`)}`; | ||
} | ||
|
||
console.info('collection run completed.'); | ||
}); |
Oops, something went wrong.