From a6e1f86813113493d13e258707130eb9bbcd4521 Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Mon, 17 Jun 2024 22:46:40 -0400 Subject: [PATCH] Add a plan-only test for json_params --- s3/tests/creation.tftest.hcl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/s3/tests/creation.tftest.hcl b/s3/tests/creation.tftest.hcl index 6a4b516..a02a566 100644 --- a/s3/tests/creation.tftest.hcl +++ b/s3/tests/creation.tftest.hcl @@ -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" + } +}