Skip to content

Commit

Permalink
Merge pull request #2524 from govuk-one-login/pyic-7476-cri-disbaled-…
Browse files Browse the repository at this point in the history
…cri-tests

PYIC-7476: CRI disabled API tests
  • Loading branch information
Wynndow authored Oct 3, 2024
2 parents 1cb0f59 + 0bff9af commit 5a1113c
Show file tree
Hide file tree
Showing 33 changed files with 571 additions and 144 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pre-merge-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ jobs:
EVCS_STUB_API_KEY: ${{ secrets.API_KEY_EVCS }}
CRI_STUB_GEN_CRED_API_KEY: ${{ secrets.CRI_STUB_GEN_CRED_API_KEY }}
MANAGEMENT_TICF_API_KEY: ${{ secrets.MANAGEMENT_TICF_API_KEY }}
CIMIT_INTERNAL_API_KEY: ${{ secrets.API_KEY_CIMIT }}
run: npm run test:ci

- name: Upload API test report
Expand Down
4 changes: 2 additions & 2 deletions api-tests/.env.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ ASYNC_QUEUE_NAME="stubQueue_F2FQueue_build"
ASYNC_QUEUE_DELAY=5
EVCS_STUB_BASE_URL="https://evcs.stubs.account.gov.uk"
TICF_STUB_BASE_URL="https://ticf.stubs.account.gov.uk"

# These aren't needed for build but are required to have a value for config
CIMIT_INTERNAL_API_URL="https://cimit-api.stubs.account.gov.uk"
CIMIT_STUB_BASE_URL="https://cimit.stubs.account.gov.uk"

# Also requires the following to be specified in .env or as an env variable
Expand All @@ -21,3 +20,4 @@ CIMIT_STUB_BASE_URL="https://cimit.stubs.account.gov.uk"
# EVCS_STUB_API_KEY
# MANAGEMENT_TICF_API_KEY
# MANAGEMENT_CIMIT_STUB_API_KEY
# CIMIT_INTERNAL_API_KEY
2 changes: 2 additions & 0 deletions api-tests/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ JAR_SIGNING_KEY='{"kty":"EC","d":"OXt0P05ZsQcK7eYusgIPsqZdaBCIJiW4imwUtnaAthU","
LOCAL_AUDIT_EVENTS=true
ASYNC_QUEUE_DELAY=2
CIMIT_STUB_BASE_URL="https://cimit.stubs.account.gov.uk"
CIMIT_INTERNAL_API_URL="https://cimit-api.stubs.account.gov.uk"
EVCS_STUB_BASE_URL="https://evcs.stubs.account.gov.uk"
TICF_STUB_BASE_URL="https://ticf.stubs.account.gov.uk"

# Also requires the following to be specified in .env or as an env variable
# ASYNC_QUEUE_NAME
# MANAGEMENT_CIMIT_STUB_API_KEY
# CIMIT_INTERNAL_API_KEY
# CRI_STUB_GEN_CRED_API_KEY
# EVCS_STUB_API_KEY
# MANAGEMENT_TICF_API_KEY
5 changes: 4 additions & 1 deletion api-tests/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# Required for F2F journeys in local, should correspond to the environment
# ASYNC_QUEUE_NAME="stubQueue_local_dev-<name>"

# Required for CiMit journeys in local, found in API Gateway for Cimit External API
# Required for CIMIT journeys in local, found in API Gateway for CIMIT external API
# MANAGEMENT_CIMIT_STUB_API_KEY=

# Required for posting VCs directly into CIMIT, found in API Gateway for CIMIT internal API
# CIMIT_INTERNAL_API_KEY=

# Required for generating VCs directly with the CRI stubs, found in stubs-common-infra generateCredentialApiKey
# CRI_STUB_GEN_CRED_API_KEY=

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"checkMethod": "kbv"
}
],
"ci": ["NEEDS-ENHANCED-VERIFICATION"]
"ci": ["NEEDS-ENHANCED-VERIFICATION"],
"txn": "9Q9RQKCWJA"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"checkMethod": "data",
"dataCheck": "record_check"
}
]
],
"txn": "f401fdbc-c2ca-400c-bd06-40abd43c84ba"
}
9 changes: 6 additions & 3 deletions api-tests/features/cimit/alternate-doc.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Feature: CIMIT - Alternate doc
| 'ukPassport' | 'kenneth-passport-needs-alternate-doc' | 'pyi-passport-no-match-another-way' | 'drivingLicence'| 'kenneth-driving-permit-valid' |

Scenario Outline: Alternate doc mitigation via passport or DL - DWP KBV
Given I start a new 'medium-confidence' journey with feature set 'dwpKbvTest'
Given I activate the 'dwpKbvTest' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'dcmaw' CRI response
Expand Down Expand Up @@ -110,7 +111,8 @@ Feature: CIMIT - Alternate doc
| 'ukPassport' | 'kenneth-passport-needs-alternate-doc' | 'pyi-passport-no-match-another-way' | 'drivingLicence'| 'kenneth-driving-permit-valid' |

Scenario Outline: Alternate doc mitigation via passport or DL - DWP KBV PIP page dropout
Given I start a new 'medium-confidence' journey with feature set 'dwpKbvTest'
Given I activate the 'dwpKbvTest' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'dcmaw' CRI response
Expand Down Expand Up @@ -145,7 +147,8 @@ Feature: CIMIT - Alternate doc
| 'ukPassport' | 'kenneth-passport-needs-alternate-doc' | 'pyi-passport-no-match-another-way' | 'drivingLicence'| 'kenneth-driving-permit-valid' |

Scenario Outline: Alternate doc mitigation via passport or DL - DWP KBV transition page dropout
Given I start a new 'medium-confidence' journey with feature set 'dwpKbvTest'
Given I activate the 'dwpKbvTest' feature set
When I start a new 'medium-confidence' journey
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
Then I get a 'dcmaw' CRI response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ Feature: Mitigating CIs with enhanced verification using the DCMAW CRI
When I use the OAuth response to get my identity
Then I get a 'P0' identity

Scenario: Same session DCMAW enhanced verification mitigation - DCMAW is unavailable
Given I activate the 'dcmawOffTest' feature set
When I submit an 'appTriage' event
Then I get a 'pyi-technical' page response
When I submit a 'next' event
Then I get an OAuth response
When I use the OAuth response to get my identity
Then I get a 'P0' identity

Rule: Separate session journeys

Scenario Outline: Separate session DCMAW enhanced verification mitigation - successful
Expand Down Expand Up @@ -106,14 +97,3 @@ Feature: Mitigating CIs with enhanced verification using the DCMAW CRI
Then I get an OAuth response
When I use the OAuth response to get my identity
Then I get a 'P0' identity

Scenario: Separate session DCMAW enhanced verification mitigation - DCMAW is unavailable
When I start a new 'medium-confidence' journey with feature set 'dcmawOffTest'
Then I get a 'page-ipv-identity-document-start' page response
When I submit an 'appTriage' event
# This is just ensuring that we handle this journey. It's not really an expected case.
Then I get a 'pyi-technical' page response
When I submit a 'next' event
Then I get an OAuth response
When I use the OAuth response to get my identity
Then I get a 'P0' identity
Loading

0 comments on commit 5a1113c

Please sign in to comment.