Skip to content

Commit

Permalink
Merge pull request #16 from Bhashinee/main
Browse files Browse the repository at this point in the history
Update the test cases to match the recent dynamodb connector changes
  • Loading branch information
Bhashinee authored Apr 17, 2024
2 parents 99e38fb + eed2417 commit e4638d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.8.4"
distribution-version = "2201.8.0-20230830-220400-8a7556d8"

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -64,7 +64,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.5"
version = "2.10.12"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down
24 changes: 12 additions & 12 deletions ballerina/tests/test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Client dynamoDBStreamClient = check new (config);
@test:BeforeSuite
function updateItem() returns error? {
dynamodb:ItemCreateInput request = {
tableName: mainTable,
item: {
TableName: mainTable,
Item: {
"LastPostDateTime": {
"S": "201303190422"
},
Expand All @@ -61,11 +61,11 @@ function updateItem() returns error? {
"S": "[email protected]"
}
},
conditionExpression: "ForumName <> :f and Subject <> :s",
returnValues: dynamodb:ALL_OLD,
returnItemCollectionMetrics: dynamodb:SIZE,
returnConsumedCapacity: dynamodb:TOTAL,
expressionAttributeValues: {
ConditionExpression: "ForumName <> :f and Subject <> :s",
ReturnValues: dynamodb:ALL_OLD,
ReturnItemCollectionMetrics: dynamodb:SIZE,
ReturnConsumedCapacity: dynamodb:TOTAL,
ExpressionAttributeValues: {
":f": {
"S": "Amazon DynamoDB"
},
Expand Down Expand Up @@ -131,18 +131,18 @@ function testGetRecords() returns error? {
@test:AfterSuite
function deleteUpdatedItem() returns error? {
dynamodb:ItemDeleteInput delRequest = {
tableName: mainTable,
'key: {
TableName: mainTable,
Key: {
"ForumName": {
"S": "Amazon DynamoDB"
},
"Subject": {
"S": "How do I update multiple items?"
}
},
returnConsumedCapacity: dynamodb:TOTAL,
returnItemCollectionMetrics: dynamodb:SIZE,
returnValues: dynamodb:ALL_OLD
ReturnConsumedCapacity: dynamodb:TOTAL,
ReturnItemCollectionMetrics: dynamodb:SIZE,
ReturnValues: dynamodb:ALL_OLD
};
_= check dynamodbClient->deleteItem(delRequest);
}

0 comments on commit e4638d1

Please sign in to comment.