Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Add JSON validation to the aws_s3_bucket resource. #8908

Merged

Conversation

kwilczynski
Copy link
Contributor

This commit adds support for new helper function which is used to
normalise and validate JSON string.

Signed-off-by: Krzysztof Wilczynski krzysztof.wilczynski@linux.com

@kwilczynski
Copy link
Contributor Author

Part of work which began in #8028.

@kwilczynski kwilczynski changed the title Add JSON validation to the aws_s3_bucket resource. [WIP] provider/aws: Add JSON validation to the aws_s3_bucket resource. Sep 17, 2016
@kwilczynski
Copy link
Contributor Author

I have a problem with the acceptance test:

--- FAIL: TestAccAWSS3Bucket_Policy (53.54s)
        testing.go:265: Step 1 error: Check failed: Check 2/2 error: unexpected end of JSON input

It does not seem to be related to what I've done, but somehow to: 93f31fc, where Computed: true was added to the policy, and it seem to be what is causing this problem. I need to look into this before this commit can be merged, since it fails on master too.

@kwilczynski
Copy link
Contributor Author

Need to wait for #8915 first.

@kwilczynski kwilczynski force-pushed the feature/json-validation-aws_s3_bucket branch from 7866830 to a00f8f1 Compare September 21, 2016 08:41
@kwilczynski
Copy link
Contributor Author

I have re-bases against master so that the commit includes changes done in #8915.

@kwilczynski
Copy link
Contributor Author

The acceptance test is passing:

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSS3Bucket_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/21 11:07:19 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSS3Bucket_ -timeout 120m
=== RUN   TestAccAWSS3Bucket_importBasic
--- PASS: TestAccAWSS3Bucket_importBasic (46.08s)
=== RUN   TestAccAWSS3Bucket_importWithPolicy
--- PASS: TestAccAWSS3Bucket_importWithPolicy (50.07s)
=== RUN   TestAccAWSS3Bucket_Notification
--- PASS: TestAccAWSS3Bucket_Notification (123.61s)
=== RUN   TestAccAWSS3Bucket_NotificationWithoutFilter
--- PASS: TestAccAWSS3Bucket_NotificationWithoutFilter (49.97s)
=== RUN   TestAccAWSS3Bucket_basic
--- PASS: TestAccAWSS3Bucket_basic (36.67s)
=== RUN   TestAccAWSS3Bucket_acceleration
--- PASS: TestAccAWSS3Bucket_acceleration (74.78s)
=== RUN   TestAccAWSS3Bucket_RequestPayer
--- PASS: TestAccAWSS3Bucket_RequestPayer (72.29s)
=== RUN   TestAccAWSS3Bucket_Policy
--- PASS: TestAccAWSS3Bucket_Policy (95.64s)
=== RUN   TestAccAWSS3Bucket_UpdateAcl
--- PASS: TestAccAWSS3Bucket_UpdateAcl (68.06s)
=== RUN   TestAccAWSS3Bucket_Website_Simple
--- PASS: TestAccAWSS3Bucket_Website_Simple (108.99s)
=== RUN   TestAccAWSS3Bucket_WebsiteRedirect
--- PASS: TestAccAWSS3Bucket_WebsiteRedirect (109.45s)
=== RUN   TestAccAWSS3Bucket_WebsiteRoutingRules
--- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (74.20s)
=== RUN   TestAccAWSS3Bucket_shouldFailNotFound
--- PASS: TestAccAWSS3Bucket_shouldFailNotFound (21.56s)
=== RUN   TestAccAWSS3Bucket_Versioning
--- PASS: TestAccAWSS3Bucket_Versioning (100.26s)
=== RUN   TestAccAWSS3Bucket_Cors
--- PASS: TestAccAWSS3Bucket_Cors (71.29s)
=== RUN   TestAccAWSS3Bucket_Logging
--- PASS: TestAccAWSS3Bucket_Logging (66.31s)
=== RUN   TestAccAWSS3Bucket_Lifecycle
--- PASS: TestAccAWSS3Bucket_Lifecycle (72.91s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    1242.176s

@kwilczynski kwilczynski changed the title [WIP] provider/aws: Add JSON validation to the aws_s3_bucket resource. provider/aws: Add JSON validation to the aws_s3_bucket resource. Sep 21, 2016
@kwilczynski kwilczynski changed the title provider/aws: Add JSON validation to the aws_s3_bucket resource. [WIP] provider/aws: Add JSON validation to the aws_s3_bucket resource. Sep 21, 2016
This commit adds support for new helper function which is used to
normalise and validate JSON string.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
@kwilczynski kwilczynski force-pushed the feature/json-validation-aws_s3_bucket branch 2 times, most recently from 7975e85 to 0b56e53 Compare September 22, 2016 07:26
@kwilczynski kwilczynski changed the title [WIP] provider/aws: Add JSON validation to the aws_s3_bucket resource. provider/aws: Add JSON validation to the aws_s3_bucket resource. Sep 22, 2016
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
@kwilczynski kwilczynski force-pushed the feature/json-validation-aws_s3_bucket branch from 0b56e53 to 15d33c7 Compare September 22, 2016 07:56
@stack72
Copy link
Contributor

stack72 commented Sep 22, 2016

LGTM! Thanks for the work here :)

@stack72 stack72 merged commit 076fd93 into hashicorp:master Sep 22, 2016
@ghost
Copy link

ghost commented Apr 22, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants