Skip to content

Commit

Permalink
internal/provider guardrail_test: Fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamr95 committed Aug 2, 2024
1 parent 9b65b63 commit 1a67e95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
14 changes: 6 additions & 8 deletions internal/provider/guardrail_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ func TestAccGuardrailDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttr("data.resourcely_guardrail.by_series_id", "category", "GUARDRAIL_BEST_PRACTICES"),
resource.TestCheckResourceAttr("data.resourcely_guardrail.by_series_id", "state", "GUARDRAIL_STATE_EVALUATE_ONLY"),
resource.TestCheckResourceAttr("data.resourcely_guardrail.by_series_id", "content",
`guardrail "basic test"
when aws_s3_bucket
require bucket = "acme-{team}-{project}"
end
`GUARDRAIL "basic test"
WHEN aws_s3_bucket
REQUIRE bucket = "acme-{team}-{project}"
`),
),
},
Expand All @@ -43,10 +42,9 @@ resource "resourcely_guardrail" "basic_data_source" {
category = "GUARDRAIL_BEST_PRACTICES"
state = "GUARDRAIL_STATE_EVALUATE_ONLY"
content = <<-EOT
guardrail "basic test"
when aws_s3_bucket
require bucket = "acme-{team}-{project}"
end
GUARDRAIL "basic test"
WHEN aws_s3_bucket
REQUIRE bucket = "acme-{team}-{project}"
EOT
}
Expand Down
14 changes: 6 additions & 8 deletions internal/provider/guardrail_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ func TestAccGuardrailResource_basic(t *testing.T) {
resource.TestCheckResourceAttr("resourcely_guardrail.basic", "category", "GUARDRAIL_BEST_PRACTICES"),
resource.TestCheckResourceAttr("resourcely_guardrail.basic", "state", "GUARDRAIL_STATE_EVALUATE_ONLY"),
resource.TestCheckResourceAttr("resourcely_guardrail.basic", "content",
`guardrail "basic test"
when aws_s3_bucket
require bucket = "acme-{team}-{project}"
end
`GUARDRAIL "basic test"
WHEN aws_s3_bucket
REQUIRE bucket = "acme-{team}-{project}"
`),
),
},
Expand Down Expand Up @@ -75,10 +74,9 @@ resource "resourcely_guardrail" "basic" {
category = "GUARDRAIL_BEST_PRACTICES"
state = "GUARDRAIL_STATE_EVALUATE_ONLY"
content = <<-EOT
guardrail "basic test"
when aws_s3_bucket
require bucket = "acme-{team}-{project}"
end
GUARDRAIL "basic test"
WHEN aws_s3_bucket
REQUIRE bucket = "acme-{team}-{project}"
EOT
}
`, name)
Expand Down

0 comments on commit 1a67e95

Please sign in to comment.