Skip to content

Commit 184b17d

Browse files
committed
CCM-14325: Update PDM upload rejected component test
1 parent 8099119 commit 184b17d

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

infrastructure/terraform/components/dl/locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
apim_keystore_s3_bucket = "nhs-${var.aws_account_id}-${var.region}-${var.environment}-${var.component}-static-assets"
55
apim_private_key_ssm_parameter_name = "/${var.component}/${var.environment}/apim/private_key"
66
aws_lambda_functions_dir_path = "../../../../lambdas"
7-
pdm_access_token_ssm_parameter_name = var.enable_pdm_mock ? "" : "${local.apim_access_token_ssm_parameter_name}"
7+
pdm_access_token_ssm_parameter_name = var.enable_pdm_mock ? "" : local.apim_access_token_ssm_parameter_name
88
pdm_url = var.enable_pdm_mock ? aws_api_gateway_stage.pdm_mock[0].invoke_url : var.apim_base_url
99
firehose_output_path_prefix = "kinesis-firehose-output"
1010
log_destination_arn = "arn:aws:logs:${var.region}:${var.shared_infra_account_id}:destination:nhs-main-obs-firehose-logs"

tests/playwright/digital-letters-component-tests/pdm-uploader.component.spec.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,20 +114,15 @@ test.describe('Digital Letters - Upload to PDM', () => {
114114
});
115115

116116
test('should send a pdm.resource.submission.rejected event following an error from PDM', async () => {
117-
// Note: I suspect this will fail once we are using the PDM Mock and will need amending.
118117
const eventId = uuidv4();
119118
const letterId = uuidv4();
120119
const resourceKey = `test/${letterId}`;
121120
const messageUri = `s3://${LETTERS_S3_BUCKET_NAME}/${resourceKey}`;
122-
const messageReference = uuidv4();
121+
const messageReference = 'error-500-internal'; // This reference causes the PDM mock to return an error.
123122
const senderId = SENDER_ID_SKIPS_NOTIFY;
124123
const meshMessageId = '12345';
125-
const invalidPdmRequest = {
126-
...pdmRequest,
127-
unexpectedField: 'I should not be here',
128-
};
129124

130-
await putDataS3(invalidPdmRequest, {
125+
await putDataS3(pdmRequest, {
131126
Bucket: LETTERS_S3_BUCKET_NAME,
132127
Key: resourceKey,
133128
});

0 commit comments

Comments
 (0)