Skip to content

Commit

Permalink
updating regexps
Browse files Browse the repository at this point in the history
  • Loading branch information
haitchison committed Dec 20, 2023
1 parent 9768b56 commit 587a3e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/lambda_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ func TestLambdaCreation(t *testing.T) {
functionName := terraform.Output(t, terraformOptions, "function_name")
resultCode := terraform.Output(t, terraformOptions, "result_code")

checkSubnetId := terraform.Output(t, terraformOptions, "subnet_ids")
checkSecurityGroupId := terraform.Output(t, terraformOptions, "security_group_ids")
subnetId := terraform.Output(t, terraformOptions, "subnet_ids")
securityGroupId := terraform.Output(t, terraformOptions, "security_group_ids")

re := regexp.MustCompile(`[{}\[\]\s]`)
subnetId = re.ReplaceAllString(checkSubnetId, "")
securityGroupId = re.ReplaceAllString(checkSecurityGroupId, "")
subnetId = re.ReplaceAllString(subnetId, "")
securityGroupId = re.ReplaceAllString(securityGroupId, "")

assert.Regexp(t, regexp.MustCompile(`^instance-scheduler-lambda-function*`), functionName)
assert.Regexp(t, regexp.MustCompile(`^200*`), resultCode)
Expand Down

0 comments on commit 587a3e7

Please sign in to comment.