Skip to content

Commit b0fb2df

Browse files
CCM-10442: Test fixes
1 parent 6b3a0e1 commit b0fb2df

File tree

6 files changed

+8
-37
lines changed

6 files changed

+8
-37
lines changed

infrastructure/terraform/components/sandbox/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
1919
| <a name="input_group"></a> [group](#input\_group) | The group variables are being inherited from (often synonymous with account short-name) | `string` | n/a | yes |
2020
| <a name="input_kms_deletion_window"></a> [kms\_deletion\_window](#input\_kms\_deletion\_window) | When a kms key is deleted, how long should it wait in the pending deletion state? | `string` | `"30"` | no |
21-
| <a name="input_letter_suppliers"></a> [letter\_suppliers](#input\_letter\_suppliers) | Letter suppliers enabled in the environment | <pre>map(object({<br/> email_addresses = list(string)<br/> enable_polling = bool<br/> default_supplier = optional(bool)<br/> }))</pre> | <pre>{<br/> "WTMMOCK": {<br/> "default_supplier": true,<br/> "email_addresses": [],<br/> "enable_polling": true<br/> }<br/>}</pre> | no |
2221
| <a name="input_log_retention_in_days"></a> [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | The retention period in days for the Cloudwatch Logs events to be retained, default of 0 is indefinite | `number` | `0` | no |
2322
| <a name="input_parent_acct_environment"></a> [parent\_acct\_environment](#input\_parent\_acct\_environment) | Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments | `string` | `"main"` | no |
2423
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |

infrastructure/terraform/components/sandbox/module_backend_api.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module "backend_api" {
2020
enable_proofing = true
2121
letter_suppliers = {
2222
WTMMOCK = {
23-
email_addresses = concat(var.letter_suppliers.WTMMOCK.email_addresses, [local.sandbox_letter_supplier_mock_recipient])
23+
email_addresses = [local.sandbox_letter_supplier_mock_recipient]
2424
enable_polling = true
2525
default_supplier = true
2626
}

infrastructure/terraform/components/sandbox/variables.tf

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -63,32 +63,6 @@ variable "kms_deletion_window" {
6363
default = "30"
6464
}
6565

66-
variable "letter_suppliers" {
67-
type = map(object({
68-
email_addresses = list(string)
69-
enable_polling = bool
70-
default_supplier = optional(bool)
71-
}))
72-
73-
default = {
74-
"WTMMOCK" = {
75-
email_addresses = []
76-
enable_polling = true
77-
default_supplier = true
78-
}
79-
}
80-
81-
validation {
82-
condition = (
83-
length(var.letter_suppliers) == 0 ||
84-
length([for s in values(var.letter_suppliers) : s if s.default_supplier]) == 1
85-
)
86-
error_message = "If letter suppliers are configured, exactly one must be default_supplier"
87-
}
88-
89-
description = "Letter suppliers enabled in the environment"
90-
}
91-
9266
variable "parent_acct_environment" {
9367
type = string
9468
description = "Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments"

tests/test-team/helpers/email-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class EmailHelper {
5555
prefix: string,
5656
templateId: string,
5757
dateCutoff: Date,
58-
extraTextToSearch: string,
58+
extraTextToSearch: string
5959
) {
6060
const s3Items = await this.getAllS3Items(prefix);
6161

tests/test-team/template-mgmt-e2e-tests/template-mgmt-letter-full.e2e.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,15 @@ function checkEmail(
261261
expandedTemplateId: string,
262262
testStart: Date,
263263
emailTitle: string,
264-
extraTextToSearch: string,
264+
extraTextToSearch: string
265265
) {
266266
return test.step('check email', async () => {
267267
await expect(async () => {
268268
const emailContents = await emailHelper.getEmailForTemplateId(
269269
process.env.TEST_EMAIL_BUCKET_PREFIX,
270270
expandedTemplateId,
271271
testStart,
272-
extraTextToSearch,
272+
extraTextToSearch
273273
);
274274

275275
expect(emailContents).toContain(expandedTemplateId);
@@ -325,7 +325,7 @@ test.describe('letter complete e2e journey', () => {
325325
expandedTemplateId,
326326
testStart,
327327
'Proof Requested',
328-
'proof-requested-sender',
328+
'proof-requested-sender'
329329
);
330330

331331
await submit(page, templateStorageHelper, templateKey);
@@ -334,7 +334,7 @@ test.describe('letter complete e2e journey', () => {
334334
expandedTemplateId,
335335
testStart,
336336
'Template Submitted',
337-
'template-submitted-sender',
337+
'template-submitted-sender'
338338
);
339339
});
340340

utils/backend-config/src/backend-config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export const BackendConfigHelper = {
3838
userPoolClientId: process.env.USER_POOL_CLIENT_ID ?? '',
3939
sftpPollLambdaName: process.env.SFTP_POLL_LAMBDA_NAME ?? '',
4040
testEmailBucketName: process.env.TEST_EMAIL_BUCKET_NAME ?? '',
41-
testEmailBucketPrefix:
42-
process.env.TEST_EMAIL_BUCKET_PREFIX ?? '',
41+
testEmailBucketPrefix: process.env.TEST_EMAIL_BUCKET_PREFIX ?? '',
4342
};
4443
},
4544

@@ -60,8 +59,7 @@ export const BackendConfigHelper = {
6059
config.templatesDownloadBucketName;
6160
process.env.SFTP_POLL_LAMBDA_NAME = config.sftpPollLambdaName;
6261
process.env.TEST_EMAIL_BUCKET_NAME = config.testEmailBucketName;
63-
process.env.TEST_EMAIL_BUCKET_PREFIX =
64-
config.testEmailBucketPrefix;
62+
process.env.TEST_EMAIL_BUCKET_PREFIX = config.testEmailBucketPrefix;
6563
},
6664

6765
fromTerraformOutputsFile(filepath: string): BackendConfig {

0 commit comments

Comments
 (0)