Skip to content
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def secrets = [
secret('pcs-prd-admin-password', 'PCS_PRD_ADMIN_PASSWORD'),
secret('idam-expired-user-token', 'IDAM_EXPIRED_USER_TOKEN'),
secret('s2s-expired-service-token', 'S2S_EXPIRED_TOKEN'),
secret('pcs-solicitor-automation-email','PCS_SOLICITOR_AUTOMATION_EMAIL'),
]
]

Expand Down
1 change: 1 addition & 0 deletions Jenkinsfile_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def pcsE2eVaultSecrets = [
secret('pcs-api-idam-secret', 'PCS_API_IDAM_SECRET'),
secret('idam-pcs-user-password', 'IDAM_PCS_USER_PASSWORD'),
secret('pcs-solicitor-automation-uid', 'PCS_SOLICITOR_AUTOMATION_UID'),
secret('pcs-solicitor-automation-email','PCS_SOLICITOR_AUTOMATION_EMAIL'),
]

withNightlyPipeline(type, product, component) {
Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,19 @@ authMode = AuthMode.AAT
Then set the following environment variables based on the value below or named secret
from the PCS AAT key vault:

| Environment Variable | Value or Secret Name |
| ---------------------------- | ---------------------------------------------------------------------------- |
| LOCATION_REF_URL | http://rd-location-ref-api-aat.service.core-compute-aat.internal |
| DATA_STORE_URL_BASE | https://ccd-data-store-api-pcs-api-pr-{CHANGE_ID}.preview.platform.hmcts.net |
| PCS_API_S2S_SECRET | secret: pcs-api-s2s-secret |
| IDAM_CLIENT_SECRET | secret: pcs-api-idam-secret |
| PCS_IDAM_SYSTEM_USERNAME | secret: idam-system-user-name |
| PCS_IDAM_SYSTEM_PASSWORD | secret: idam-system-user-password |
| PCS_PRD_ADMIN_USERNAME | secret: pcs-prd-admin-username |
| PCS_PRD_ADMIN_PASSWORD | secret: pcs-prd-admin-password |
| IDAM_PCS_USER_PASSWORD | secret: idam-pcs-user-password |
| PCS_SOLICITOR_AUTOMATION_UID | secret: pcs-solicitor-automation-uid |
| Environment Variable | Value or Secret Name |
|--------------------------------|------------------------------------------------------------------------------|
| LOCATION_REF_URL | http://rd-location-ref-api-aat.service.core-compute-aat.internal |
| DATA_STORE_URL_BASE | https://ccd-data-store-api-pcs-api-pr-{CHANGE_ID}.preview.platform.hmcts.net |
| PCS_API_S2S_SECRET | secret: pcs-api-s2s-secret |
| IDAM_CLIENT_SECRET | secret: pcs-api-idam-secret |
| PCS_IDAM_SYSTEM_USERNAME | secret: idam-system-user-name |
| PCS_IDAM_SYSTEM_PASSWORD | secret: idam-system-user-password |
| PCS_PRD_ADMIN_USERNAME | secret: pcs-prd-admin-username |
| PCS_PRD_ADMIN_PASSWORD | secret: pcs-prd-admin-password |
| IDAM_PCS_USER_PASSWORD | secret: idam-pcs-user-password |
| PCS_SOLICITOR_AUTOMATION_UID | secret: pcs-solicitor-automation-uid |
| PCS_SOLICITOR_AUTOMATION_EMAIL | secret: pcs-solicitor-automation-email |

Finally, run the service with the `bootWithCCD` task as above.

Expand All @@ -91,13 +92,13 @@ To access the swagger documentation for the API, go to http://localhost:3206/swa
#### Generating the CCD definition XLS
We can generate the xlsx spreadsheet by running the script:
```
./bin/create-xlsx.sh
./bin/create-xlsx.sh
```
This spreadsheet can be found in: /build/definitions/CCD_Definition_PCS_ENVIRONMENT.xlsx
This spreadsheet can be found in: /build/definitions/CCD_Definition_PCS_ENVIRONMENT.xlsx

You can specify which environment to generate the spreadsheet for by passing it in when calling the script. E.g ./bin/create-xlsx.sh preview.

If you encounter the error:
If you encounter the error:
```
[{"code":"UNAUTHORIZED","message":"authentication required,}]
```
Expand Down
2 changes: 1 addition & 1 deletion src/e2eTest/config/global-setup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function authenticateAndSaveState(): Promise<string> {
);
}
if (!user.claimantSolicitor.email || !user.claimantSolicitor.password) {
throw new Error('Login failed: missing credentials. Set IDAM_PCS_USER_PASSWORD.');
throw new Error('Login failed: missing credentials. Set PCS_SOLICITOR_AUTOMATION_EMAIL and IDAM_PCS_USER_PASSWORD.');
}

const authDir = path.dirname(STORAGE_STATE_PATH);
Expand Down
2 changes: 1 addition & 1 deletion src/e2eTest/data/user-data/permanent.user.data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const user = {
claimantSolicitor: {
email: 'pcs-solicitor-automation@test.com',
email: process.env.PCS_SOLICITOR_AUTOMATION_EMAIL,
password: process.env.IDAM_PCS_USER_PASSWORD,
uid: process.env.PCS_SOLICITOR_AUTOMATION_UID
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class TestConstants {
public static final String SERVICE_AUTHORIZATION = "ServiceAuthorization";
public static final String EXPIRED_S2S_TOKEN = getEnv("S2S_EXPIRED_TOKEN");
public static final String EXPIRED_IDAM_TOKEN = getEnv("IDAM_EXPIRED_USER_TOKEN");
public static final String PCS_SOLICITOR_USER = "pcs-solicitor-automation@test.com";
public static final String PCS_SOLICITOR_USER = getEnv("PCS_SOLICITOR_AUTOMATION_EMAIL");
public static final String PCS_SOLICITOR_AUTOMATION_IDAM_UID = getEnv("PCS_SOLICITOR_AUTOMATION_UID");
public static final String GENERIC_PASSWORD = getEnv("IDAM_PCS_USER_PASSWORD");
}
Loading