Skip to content

Commit

Permalink
Refactor redis scaler config (kedacore#5997)
Browse files Browse the repository at this point in the history
Signed-off-by: SpiritZhou <iammrzhouzhenghan@gmail.com>
Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>
  • Loading branch information
SpiritZhou authored and JorTurFer committed Oct 7, 2024
1 parent e6e50eb commit e7b736e
Show file tree
Hide file tree
Showing 7 changed files with 1,060 additions and 1,291 deletions.
10 changes: 5 additions & 5 deletions pkg/scalers/aws_dynamodb_scaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ type parseDynamoDBMetadataTestData struct {

var (
// ErrAwsDynamoNoTableName is returned when "tableName" is missing from the config.
ErrAwsDynamoNoTableName = errors.New("missing required parameter \"tableName\"")
ErrAwsDynamoNoTableName = errors.New("missing required parameter [\"tableName\"]")

// ErrAwsDynamoNoAwsRegion is returned when "awsRegion" is missing from the config.
ErrAwsDynamoNoAwsRegion = errors.New("missing required parameter \"awsRegion\"")
ErrAwsDynamoNoAwsRegion = errors.New("missing required parameter [\"awsRegion\"]")

// ErrAwsDynamoNoKeyConditionExpression is returned when "keyConditionExpression" is missing from the config.
ErrAwsDynamoNoKeyConditionExpression = errors.New("missing required parameter \"keyConditionExpression\"")
ErrAwsDynamoNoKeyConditionExpression = errors.New("missing required parameter [\"keyConditionExpression\"]")
)

var dynamoTestCases = []parseDynamoDBMetadataTestData{
Expand Down Expand Up @@ -114,7 +114,7 @@ var dynamoTestCases = []parseDynamoDBMetadataTestData{
"targetValue": "no-valid",
},
authParams: map[string]string{},
expectedError: errors.New("error parsing DynamoDb metadata: unable to set param \"targetValue\" value"),
expectedError: errors.New("error parsing DynamoDb metadata: unable to set param [\"targetValue\"] value"),
},
{
name: "invalid activationTargetValue given",
Expand All @@ -128,7 +128,7 @@ var dynamoTestCases = []parseDynamoDBMetadataTestData{
"activationTargetValue": "no-valid",
},
authParams: map[string]string{},
expectedError: errors.New("unable to set param \"activationTargetValue\""),
expectedError: errors.New("unable to set param [\"activationTargetValue\"]"),
},
{
name: "malformed expressionAttributeNames",
Expand Down
Loading

0 comments on commit e7b736e

Please sign in to comment.