Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ CHANGELOG.md
**/*/report.md
clients/**/src
clients/**/README.md
clients/**/test/index-objects.spec.mjs
clients/**/test/index-types.ts
clients/**/test/snapshots.integ.spec.ts
private/**
!private/aws-client-api-test/src/**/*
packages/nested-clients/src/submodules/*/endpoint/ruleset.ts
Expand Down
38 changes: 18 additions & 20 deletions clients/client-appconfigdata/test/snapshots.integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,25 @@ const Client = AppConfigDataClient;

const mode = (process.env.SNAPSHOT_MODE as "write" | "compare") ?? "write";

describe(
"AppConfigDataClient" + ` (${mode})`,
() => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas: new Map<any, any>([
describe("AppConfigDataClient" + ` (${mode})`, () => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas:
new Map<any, any>([
[GetLatestConfiguration$, GetLatestConfigurationCommand],
[StartConfigurationSession$, StartConfigurationSessionCommand],
]),
});

runner.run();
},
30_000
);
});

runner.run();
}, 30_000);
38 changes: 18 additions & 20 deletions clients/client-bedrock-runtime/test/snapshots.integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,20 @@ const Client = BedrockRuntimeClient;

const mode = (process.env.SNAPSHOT_MODE as "write" | "compare") ?? "write";

describe(
"BedrockRuntimeClient" + ` (${mode})`,
() => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas: new Map<any, any>([
describe("BedrockRuntimeClient" + ` (${mode})`, () => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas:
new Map<any, any>([
[ApplyGuardrail$, ApplyGuardrailCommand],
[Converse$, ConverseCommand],
[ConverseStream$, ConverseStreamCommand],
Expand All @@ -58,9 +57,8 @@ describe(
[ListAsyncInvokes$, ListAsyncInvokesCommand],
[StartAsyncInvoke$, StartAsyncInvokeCommand],
]),
});

runner.run();
},
30_000
);
});

runner.run();
}, 30_000);
38 changes: 18 additions & 20 deletions clients/client-cloudwatch/test/snapshots.integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,20 @@ const Client = CloudWatchClient;

const mode = (process.env.SNAPSHOT_MODE as "write" | "compare") ?? "write";

describe(
"CloudWatchClient" + ` (${mode})`,
() => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas: new Map<any, any>([
describe("CloudWatchClient" + ` (${mode})`, () => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas:
new Map<any, any>([
[DeleteAlarmMuteRule$, DeleteAlarmMuteRuleCommand],
[DeleteAlarms$, DeleteAlarmsCommand],
[DeleteAnomalyDetector$, DeleteAnomalyDetectorCommand],
Expand Down Expand Up @@ -157,9 +156,8 @@ describe(
[TagResource$, TagResourceCommand],
[UntagResource$, UntagResourceCommand],
]),
});

runner.run();
},
30_000
);
});

runner.run();
}, 30_000);
38 changes: 18 additions & 20 deletions clients/client-cognito-identity/test/snapshots.integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,20 @@ const Client = CognitoIdentityClient;

const mode = (process.env.SNAPSHOT_MODE as "write" | "compare") ?? "write";

describe(
"CognitoIdentityClient" + ` (${mode})`,
() => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas: new Map<any, any>([
describe("CognitoIdentityClient" + ` (${mode})`, () => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas:
new Map<any, any>([
[CreateIdentityPool$, CreateIdentityPoolCommand],
[DeleteIdentities$, DeleteIdentitiesCommand],
[DeleteIdentityPool$, DeleteIdentityPoolCommand],
Expand All @@ -97,9 +96,8 @@ describe(
[UntagResource$, UntagResourceCommand],
[UpdateIdentityPool$, UpdateIdentityPoolCommand],
]),
});

runner.run();
},
30_000
);
});

runner.run();
}, 30_000);
38 changes: 18 additions & 20 deletions clients/client-dynamodb-streams/test/snapshots.integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,27 @@ const Client = DynamoDBStreamsClient;

const mode = (process.env.SNAPSHOT_MODE as "write" | "compare") ?? "write";

describe(
"DynamoDBStreamsClient" + ` (${mode})`,
() => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas: new Map<any, any>([
describe("DynamoDBStreamsClient" + ` (${mode})`, () => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas:
new Map<any, any>([
[DescribeStream$, DescribeStreamCommand],
[GetRecords$, GetRecordsCommand],
[GetShardIterator$, GetShardIteratorCommand],
[ListStreams$, ListStreamsCommand],
]),
});

runner.run();
},
30_000
);
});

runner.run();
}, 30_000);
38 changes: 18 additions & 20 deletions clients/client-dynamodb/test/snapshots.integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,20 @@ const Client = DynamoDBClient;

const mode = (process.env.SNAPSHOT_MODE as "write" | "compare") ?? "write";

describe(
"DynamoDBClient" + ` (${mode})`,
() => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas: new Map<any, any>([
describe("DynamoDBClient" + ` (${mode})`, () => {
const runner = new SnapshotRunner({
snapshotDirPath: join(__dirname, "snapshots"),
Client,
mode,
testCase(caseName: string, run: () => Promise<void>) {
it(caseName, run);
},
assertions(caseName: string, expected: string, actual: string): Promise<void> {
expect(actual).toEqual(expected);
return Promise.resolve();
},
schemas:
new Map<any, any>([
[BatchExecuteStatement$, BatchExecuteStatementCommand],
[BatchGetItem$, BatchGetItemCommand],
[BatchWriteItem$, BatchWriteItemCommand],
Expand Down Expand Up @@ -199,9 +198,8 @@ describe(
[UpdateTableReplicaAutoScaling$, UpdateTableReplicaAutoScalingCommand],
[UpdateTimeToLive$, UpdateTimeToLiveCommand],
]),
});

runner.run();
},
30_000
);
});

runner.run();
}, 30_000);
Loading
Loading