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

Unit Test TestAccDataSourceAwsCurReportDefinition fails #14827

Closed
robbruce opened this issue Aug 25, 2020 · 2 comments
Closed

Unit Test TestAccDataSourceAwsCurReportDefinition fails #14827

robbruce opened this issue Aug 25, 2020 · 2 comments
Labels
technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Comments

@robbruce
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

terraform 0.13
provider: master branch

Affected Resource(s)

N/A - issue with unit test

Unit Test TestAccDataSourceAwsCurReportDefinition

Terraform Configuration Files

N/A

Debug Output

make testacc TESTARGS='-run=TestAccDataSourceAwsCurReportDefinition'

Panic Output

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccDataSourceAwsCurReportDefinition -timeout 120m
=== RUN   TestAccDataSourceAwsCurReportDefinition_basic
=== PAUSE TestAccDataSourceAwsCurReportDefinition_basic
=== CONT  TestAccDataSourceAwsCurReportDefinition_basic
    TestAccDataSourceAwsCurReportDefinition_basic: data_source_aws_cur_report_definition_test.go:24: Step 1/1 error: terraform failed: exit status 1

        stderr:

        Error: "policy" contains an invalid JSON: invalid character 'd' looking for beginning of value

          on config679041669/terraform_plugin_test.tf line 17, in resource "aws_s3_bucket_policy" "test":
          17:   policy = <<POLICY
          18: {
          19:   "Version": "2008-10-17",
          20:   "Id": "s3policy",
          21:   "Statement": [
          22:     {
          23:       "Sid": "AllowCURBillingACLPolicy",
          24:       "Effect": "Allow",
          25:       "Principal": {
          26:         "AWS": data.aws_billing_service_account.test.arn
          27:       },
          28:       "Action": [
          29:         "s3:GetBucketAcl",
          30:         "s3:GetBucketPolicy"
          31:       ],
          32:       "Resource": aws_s3_bucket.test.arn
          33:     },
          34:     {
          35:       "Sid": "AllowCURPutObject",
          36:       "Effect": "Allow",
          37:       "Principal": {
          38:         "AWS": "arn:aws:iam::386209384616:root"
          39:       },
          40:       "Action": "s3:PutObject",
          41:       "Resource": "arn:aws:s3:::${aws_s3_bucket.test.id}/*"
          42:     }
          43:   ]
          44: }
          45: POLICY

Expected Behavior

Unit test should run

Actual Behavior

Unit test errors

Steps to Reproduce

# assume role with rights to setup organisation definition (org root or isolated account)
export AWS_DEFAULT_REGION="us-east-1"
export AWS_REGION="us-east-1"
make testacc TESTARGS='-run=TestAccDataSourceAwsCurReportDefinition'

Important Factoids

References

@ghost ghost added the service/s3 Issues and PRs that pertain to the s3 service. label Aug 25, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 25, 2020
@ewbankkit ewbankkit added service/budgets Issues and PRs that pertain to the budgets service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/costandusagereportservice and removed needs-triage Waiting for first response or review from a maintainer. service/s3 Issues and PRs that pertain to the s3 service. service/budgets Issues and PRs that pertain to the budgets service. labels Aug 26, 2020
@bflad
Copy link
Contributor

bflad commented Sep 24, 2020

#12428 was merged awhile back. 👍

@bflad bflad closed this as completed Sep 24, 2020
@ghost
Copy link

ghost commented Oct 25, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Oct 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

No branches or pull requests

3 participants