Skip to content

Commit

Permalink
Add a plan-only test for json_params
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Jun 18, 2024
1 parent 3616a5e commit a6e1f86
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions s3/tests/creation.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ run "test_bucket_creation" {
error_message = "Service instance name should match the name variable"
}
}

run "test_json_params" {
command = plan

variables {
json_params = jsonencode({
object_ownership = "BucketOwnerEnforced"
})
}

assert {
condition = cloudfoundry_service_instance.bucket.json_params == "{\"object_ownership\":\"BucketOwnerEnforced\"}"
error_message = "Service instance json_params should be configurable"
}
}

0 comments on commit a6e1f86

Please sign in to comment.