Skip to content

Commit ad22bb0

Browse files
committed
CCM-11192: usability additions
1 parent da9579e commit ad22bb0

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

scripts/test-data/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Simple script to generate test data. It uploads a PDF to the test S3 bucket and
44

55
## Usage
66

7-
Log in the desired AWS account and then run the command below. Note that the AWS account ID is required in order to resolve the bucket name.
7+
Log in the desired AWS account and then run the command below. You may need to set the AWS_REGION envar (eu-west-2)
8+
9+
Note that the AWS account ID is required in order to resolve the bucket name.
810

911
```bash
1012
npm run cli -- create-letter \
@@ -16,3 +18,14 @@ npm run cli -- create-letter \
1618
--specification-id specification-id \
1719
--status PENDING
1820
```
21+
22+
```bash
23+
npm run cli -- create-letter-batch \
24+
--supplier-id supplier-id \
25+
--environment main \
26+
--awsAccountId 820178564574 \
27+
--group-id group-id \
28+
--specification-id specification-id \
29+
--status PENDING \
30+
--count 10
31+
```

scripts/test-data/src/cli/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { randomUUID } from "crypto";
77
import { createLetter, createLetterDto } from "../helpers/create_letter_helpers";
88
import { createLetterRepository } from "../infrastructure/letter-repo-factory";
99
import { uploadFile } from "../helpers/s3_helpers";
10+
import { Console } from "console";
1011

1112
async function main() {
1213
await yargs(hideBin(process.argv))
@@ -179,6 +180,8 @@ async function main() {
179180

180181
// Upload Letters
181182
await letterRepository.putLetterBatch(letterDtos);
183+
184+
console.log(`Created batch ${batchId} of ${letterDtos.length}`);
182185
},
183186
)
184187
.demandCommand(1)

0 commit comments

Comments
 (0)