Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sdk client misconfiguration #283

Merged
merged 6 commits into from
Nov 8, 2023
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
1,206 changes: 632 additions & 574 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"pre:commit": "npm run prettier && npm run lint",
"pre:test": "docker run -d -p 8022:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedDb",
"test": "LOCAL_DYNAMODB_HOST=127.0.0.1 LOCAL_DYNAMODB_PORT=8022 npx jest --runInBand --config jest.config.json --coverage --detectOpenHandles",
"test:ci": "LOCAL_DYNAMODB_HOST=localhost LOCAL_DYNAMODB_PORT=8022 npx jest --runInBand --config jest.config.json --coverage --detectOpenHandles",
"test:ci": "AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test LOCAL_DYNAMODB_HOST=localhost LOCAL_DYNAMODB_PORT=8022 npx jest --runInBand --config jest.config.json --coverage --detectOpenHandles",
"build": "npx tsc",
"semantic-release": "semantic-release",
"prepare": "husky install"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.370.0",
"@aws-sdk/lib-dynamodb": "^3.370.0",
"joi": "^17.9.2",
"uuid": "^9.0.0"
"@aws-sdk/client-dynamodb": "^3.445.0",
"@aws-sdk/lib-dynamodb": "^3.445.0",
"joi": "^17.11.0",
"uuid": "^9.0.1"
},
"devDependencies": {
"@commitlint/cli": "^17.6.6",
Expand Down
4 changes: 0 additions & 4 deletions test/hooks/create-tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ const tables: Record<string, CreateTableCommandInput> = {
};

const dynamodb = new DynamoDBClient({
credentials: {
accessKeyId: '$fake',
secretAccessKey: '$fake',
},
region: 'local',
endpoint: `http://${process.env.LOCAL_DYNAMODB_HOST}:${process.env.LOCAL_DYNAMODB_PORT || 8000}`,
});
Expand Down
4 changes: 0 additions & 4 deletions test/models/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { DynamoDBClient } from '@aws-sdk/client-dynamodb';

export default DynamoDBDocumentClient.from(
new DynamoDBClient({
credentials: {
accessKeyId: '$fake',
secretAccessKey: '$fake',
},
region: 'local',
endpoint: `http://${process.env.LOCAL_DYNAMODB_HOST}:${process.env.LOCAL_DYNAMODB_PORT || 8000}`,
}),
Expand Down
4 changes: 3 additions & 1 deletion test/tables/composite-key.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {CreateTableCommandInput} from "@aws-sdk/client-dynamodb";

export default {
AttributeDefinitions: [
{
Expand Down Expand Up @@ -70,4 +72,4 @@ export default {
},
},
],
};
} as CreateTableCommandInput;
4 changes: 3 additions & 1 deletion test/tables/hash-key.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {CreateTableCommandInput} from "@aws-sdk/client-dynamodb";

export default {
AttributeDefinitions: [
{
Expand All @@ -16,4 +18,4 @@ export default {
WriteCapacityUnits: 5,
},
TableName: 'table_test_hashkey',
};
} as CreateTableCommandInput;
4 changes: 3 additions & 1 deletion test/tables/numerical-keys.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {CreateTableCommandInput} from "@aws-sdk/client-dynamodb";

export default {
AttributeDefinitions: [
{
Expand Down Expand Up @@ -70,4 +72,4 @@ export default {
},
},
],
};
} as CreateTableCommandInput;
Loading