Skip to content

Commit 41783a5

Browse files
committed
Update after merge
1 parent a783195 commit 41783a5

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

tests/database/index.test.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { EC2Client } from '@aws-sdk/client-ec2';
77
import { InlineProgramArgs } from '@pulumi/pulumi/automation';
88
import { KMSClient } from '@aws-sdk/client-kms';
99
import { RDSClient } from '@aws-sdk/client-rds';
10+
import { requireEnv } from '../util';
1011
import { testDefaultDb } from './default-db.test';
1112

1213
const programArgs: InlineProgramArgs = {
@@ -15,22 +16,18 @@ const programArgs: InlineProgramArgs = {
1516
program: () => import('./infrastructure'),
1617
};
1718

18-
describe('Database component deployment', () => {
19-
const region = process.env.AWS_REGION;
20-
if (!region) {
21-
throw new Error('AWS_REGION environment variable is required');
22-
}
23-
24-
const ctx: DatabaseTestContext = {
25-
outputs: {},
26-
config,
27-
clients: {
28-
rds: new RDSClient({ region }),
29-
ec2: new EC2Client({ region }),
30-
kms: new KMSClient({ region }),
31-
},
32-
};
19+
const region = requireEnv('AWS_REGION');
20+
const ctx: DatabaseTestContext = {
21+
outputs: {},
22+
config,
23+
clients: {
24+
rds: new RDSClient({ region }),
25+
ec2: new EC2Client({ region }),
26+
kms: new KMSClient({ region }),
27+
},
28+
};
3329

30+
describe('Database component deployment', () => {
3431
before(async () => {
3532
ctx.outputs = await automation.deploy(programArgs);
3633
});

0 commit comments

Comments
 (0)