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

gosimple: Fix CloudFront-related issues #6408

Merged
merged 1 commit into from
Nov 12, 2018

Conversation

YakDriver
Copy link
Member

Related to #6343 technical debt

Changes proposed in this pull request:

  • Fixes for CloudFront-related issues

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestCloudFrontStructure_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestCloudFrontStructure_ -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestCloudFrontStructure_expandDefaultCacheBehavior
--- PASS: TestCloudFrontStructure_expandDefaultCacheBehavior (0.00s)
=== RUN   TestCloudFrontStructure_flattenDefaultCacheBehavior
--- PASS: TestCloudFrontStructure_flattenDefaultCacheBehavior (0.00s)
=== RUN   TestCloudFrontStructure_expandCacheBehavior
--- PASS: TestCloudFrontStructure_expandCacheBehavior (0.00s)
=== RUN   TestCloudFrontStructure_flattenCacheBehavior
--- PASS: TestCloudFrontStructure_flattenCacheBehavior (0.00s)
=== RUN   TestCloudFrontStructure_expandCacheBehaviors
--- PASS: TestCloudFrontStructure_expandCacheBehaviors (0.00s)
=== RUN   TestCloudFrontStructure_flattenCacheBehaviors
--- PASS: TestCloudFrontStructure_flattenCacheBehaviors (0.00s)
=== RUN   TestCloudFrontStructure_expandTrustedSigners
--- PASS: TestCloudFrontStructure_expandTrustedSigners (0.00s)
=== RUN   TestCloudFrontStructure_flattenTrustedSigners
--- PASS: TestCloudFrontStructure_flattenTrustedSigners (0.00s)
=== RUN   TestCloudFrontStructure_expandTrustedSigners_empty
--- PASS: TestCloudFrontStructure_expandTrustedSigners_empty (0.00s)
=== RUN   TestCloudFrontStructure_expandLambdaFunctionAssociations
--- PASS: TestCloudFrontStructure_expandLambdaFunctionAssociations (0.00s)
=== RUN   TestCloudFrontStructure_flattenlambdaFunctionAssociations
--- PASS: TestCloudFrontStructure_flattenlambdaFunctionAssociations (0.00s)
=== RUN   TestCloudFrontStructure_expandlambdaFunctionAssociations_empty
--- PASS: TestCloudFrontStructure_expandlambdaFunctionAssociations_empty (0.00s)
=== RUN   TestCloudFrontStructure_expandForwardedValues
--- PASS: TestCloudFrontStructure_expandForwardedValues (0.00s)
=== RUN   TestCloudFrontStructure_flattenForwardedValues
--- PASS: TestCloudFrontStructure_flattenForwardedValues (0.00s)
=== RUN   TestCloudFrontStructure_expandHeaders
--- PASS: TestCloudFrontStructure_expandHeaders (0.00s)
=== RUN   TestCloudFrontStructure_flattenHeaders
--- PASS: TestCloudFrontStructure_flattenHeaders (0.00s)
=== RUN   TestCloudFrontStructure_expandQueryStringCacheKeys
--- PASS: TestCloudFrontStructure_expandQueryStringCacheKeys (0.00s)
=== RUN   TestCloudFrontStructure_flattenQueryStringCacheKeys
--- PASS: TestCloudFrontStructure_flattenQueryStringCacheKeys (0.00s)
=== RUN   TestCloudFrontStructure_expandCookiePreference
--- PASS: TestCloudFrontStructure_expandCookiePreference (0.00s)
=== RUN   TestCloudFrontStructure_flattenCookiePreference
--- PASS: TestCloudFrontStructure_flattenCookiePreference (0.00s)
=== RUN   TestCloudFrontStructure_expandCookieNames
--- PASS: TestCloudFrontStructure_expandCookieNames (0.00s)
=== RUN   TestCloudFrontStructure_flattenCookieNames
--- PASS: TestCloudFrontStructure_flattenCookieNames (0.00s)
=== RUN   TestCloudFrontStructure_expandAllowedMethods
--- PASS: TestCloudFrontStructure_expandAllowedMethods (0.00s)
=== RUN   TestCloudFrontStructure_flattenAllowedMethods
--- PASS: TestCloudFrontStructure_flattenAllowedMethods (0.00s)
=== RUN   TestCloudFrontStructure_expandCachedMethods
--- PASS: TestCloudFrontStructure_expandCachedMethods (0.00s)
=== RUN   TestCloudFrontStructure_flattenCachedMethods
--- PASS: TestCloudFrontStructure_flattenCachedMethods (0.00s)
=== RUN   TestCloudFrontStructure_expandOrigins
--- PASS: TestCloudFrontStructure_expandOrigins (0.00s)
=== RUN   TestCloudFrontStructure_flattenOrigins
--- PASS: TestCloudFrontStructure_flattenOrigins (0.00s)
=== RUN   TestCloudFrontStructure_expandOrigin
--- PASS: TestCloudFrontStructure_expandOrigin (0.00s)
=== RUN   TestCloudFrontStructure_flattenOrigin
--- PASS: TestCloudFrontStructure_flattenOrigin (0.00s)
=== RUN   TestCloudFrontStructure_expandCustomHeaders
--- PASS: TestCloudFrontStructure_expandCustomHeaders (0.00s)
=== RUN   TestCloudFrontStructure_flattenCustomHeaders
--- PASS: TestCloudFrontStructure_flattenCustomHeaders (0.00s)
=== RUN   TestCloudFrontStructure_flattenOriginCustomHeader
--- PASS: TestCloudFrontStructure_flattenOriginCustomHeader (0.00s)
=== RUN   TestCloudFrontStructure_expandOriginCustomHeader
--- PASS: TestCloudFrontStructure_expandOriginCustomHeader (0.00s)
=== RUN   TestCloudFrontStructure_expandCustomOriginConfig
--- PASS: TestCloudFrontStructure_expandCustomOriginConfig (0.00s)
=== RUN   TestCloudFrontStructure_flattenCustomOriginConfig
--- PASS: TestCloudFrontStructure_flattenCustomOriginConfig (0.00s)
=== RUN   TestCloudFrontStructure_expandCustomOriginConfigSSL
--- PASS: TestCloudFrontStructure_expandCustomOriginConfigSSL (0.00s)
=== RUN   TestCloudFrontStructure_flattenCustomOriginConfigSSL
--- PASS: TestCloudFrontStructure_flattenCustomOriginConfigSSL (0.00s)
=== RUN   TestCloudFrontStructure_expandS3OriginConfig
--- PASS: TestCloudFrontStructure_expandS3OriginConfig (0.00s)
=== RUN   TestCloudFrontStructure_flattenS3OriginConfig
--- PASS: TestCloudFrontStructure_flattenS3OriginConfig (0.00s)
=== RUN   TestCloudFrontStructure_expandCustomErrorResponses
--- PASS: TestCloudFrontStructure_expandCustomErrorResponses (0.00s)
=== RUN   TestCloudFrontStructure_flattenCustomErrorResponses
--- PASS: TestCloudFrontStructure_flattenCustomErrorResponses (0.00s)
=== RUN   TestCloudFrontStructure_expandCustomErrorResponse
--- PASS: TestCloudFrontStructure_expandCustomErrorResponse (0.00s)
=== RUN   TestCloudFrontStructure_expandCustomErrorResponse_emptyResponseCode
--- PASS: TestCloudFrontStructure_expandCustomErrorResponse_emptyResponseCode (0.00s)
=== RUN   TestCloudFrontStructure_flattenCustomErrorResponse
--- PASS: TestCloudFrontStructure_flattenCustomErrorResponse (0.00s)
=== RUN   TestCloudFrontStructure_expandLoggingConfig
--- PASS: TestCloudFrontStructure_expandLoggingConfig (0.00s)
=== RUN   TestCloudFrontStructure_expandLoggingConfig_nilValue
--- PASS: TestCloudFrontStructure_expandLoggingConfig_nilValue (0.00s)
=== RUN   TestCloudFrontStructure_flattenLoggingConfig
--- PASS: TestCloudFrontStructure_flattenLoggingConfig (0.00s)
=== RUN   TestCloudFrontStructure_expandAliases
--- PASS: TestCloudFrontStructure_expandAliases (0.00s)
=== RUN   TestCloudFrontStructure_flattenAliases
--- PASS: TestCloudFrontStructure_flattenAliases (0.00s)
=== RUN   TestCloudFrontStructure_expandRestrictions
--- PASS: TestCloudFrontStructure_expandRestrictions (0.00s)
=== RUN   TestCloudFrontStructure_flattenRestrictions
--- PASS: TestCloudFrontStructure_flattenRestrictions (0.00s)
=== RUN   TestCloudFrontStructure_expandGeoRestriction_whitelist
--- PASS: TestCloudFrontStructure_expandGeoRestriction_whitelist (0.00s)
=== RUN   TestCloudFrontStructure_flattenGeoRestriction_whitelist
--- PASS: TestCloudFrontStructure_flattenGeoRestriction_whitelist (0.00s)
=== RUN   TestCloudFrontStructure_expandGeoRestriction_no_items
--- PASS: TestCloudFrontStructure_expandGeoRestriction_no_items (0.00s)
=== RUN   TestCloudFrontStructure_flattenGeoRestriction_no_items
--- PASS: TestCloudFrontStructure_flattenGeoRestriction_no_items (0.00s)
=== RUN   TestCloudFrontStructure_expandViewerCertificate_cloudfront_default_certificate
--- PASS: TestCloudFrontStructure_expandViewerCertificate_cloudfront_default_certificate (0.00s)
=== RUN   TestCloudFrontStructure_flattenViewerCertificate_cloudfront_default_certificate
--- PASS: TestCloudFrontStructure_flattenViewerCertificate_cloudfront_default_certificate (0.00s)
=== RUN   TestCloudFrontStructure_expandViewerCertificate_iam_certificate_id
--- PASS: TestCloudFrontStructure_expandViewerCertificate_iam_certificate_id (0.00s)
=== RUN   TestCloudFrontStructure_expandViewerCertificate_acm_certificate_arn
--- PASS: TestCloudFrontStructure_expandViewerCertificate_acm_certificate_arn (0.00s)
=== RUN   TestCloudFrontStructure_falttenViewerCertificate_iam_certificate_id
--- PASS: TestCloudFrontStructure_falttenViewerCertificate_iam_certificate_id (0.00s)
=== RUN   TestCloudFrontStructure_falttenViewerCertificate_acm_certificate_arn
--- PASS: TestCloudFrontStructure_falttenViewerCertificate_acm_certificate_arn (0.00s)
=== RUN   TestCloudFrontStructure_viewerCertificateHash_IAM
--- PASS: TestCloudFrontStructure_viewerCertificateHash_IAM (0.00s)
=== RUN   TestCloudFrontStructure_viewerCertificateHash_ACM
--- PASS: TestCloudFrontStructure_viewerCertificateHash_ACM (0.00s)
=== RUN   TestCloudFrontStructure_viewerCertificateHash_default
--- PASS: TestCloudFrontStructure_viewerCertificateHash_default (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.041s

$ make testacc TESTARGS='-run=TestAccAWSCloudFrontDistribution_importBasic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSCloudFrontDistribution_importBasic -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSCloudFrontDistribution_importBasic
=== PAUSE TestAccAWSCloudFrontDistribution_importBasic
=== CONT  TestAccAWSCloudFrontDistribution_importBasic
--- PASS: TestAccAWSCloudFrontDistribution_importBasic (886.83s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	886.874s

$ make testacc TESTARGS='-run=TestAccAWSCloudFrontOriginAccessIdentity_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSCloudFrontOriginAccessIdentity_basic -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSCloudFrontOriginAccessIdentity_basic
=== PAUSE TestAccAWSCloudFrontOriginAccessIdentity_basic
=== CONT  TestAccAWSCloudFrontOriginAccessIdentity_basic
--- PASS: TestAccAWSCloudFrontOriginAccessIdentity_basic (14.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	14.262s

@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/cloudfront Issues and PRs that pertain to the cloudfront service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 9, 2018
@bflad bflad added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label Nov 9, 2018
@bflad bflad added this to the v1.44.0 milestone Nov 9, 2018
@bflad bflad changed the base branch from master to v1.44-dev November 10, 2018 17:51
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks so much, @YakDriver! 🚀 Verified in acceptance testing and none of these being in gometalinter --disable-all --enable gosimple ./aws anymore.

--- PASS: TestAccAWSCloudFrontDistribution_Origin_EmptyDomainName (1.80s)
--- PASS: TestAccAWSCloudFrontDistribution_Origin_EmptyOriginID (1.93s)
--- PASS: TestAccAWSCloudFrontPublicKey_basic (7.97s)
--- PASS: TestAccAWSCloudFrontOriginAccessIdentity_noComment (9.46s)
--- PASS: TestAccAWSCloudFrontPublicKey_namePrefix (9.55s)
--- PASS: TestAccAWSCloudFrontOriginAccessIdentity_importBasic (9.92s)
--- PASS: TestAccAWSCloudFrontOriginAccessIdentity_basic (11.79s)
--- PASS: TestAccAWSCloudFrontPublicKey_update (16.77s)
--- PASS: TestAccAWSCloudFrontDistribution_noCustomErrorResponseConfig (818.68s)
--- PASS: TestAccAWSCloudFrontDistribution_noOptionalItemsConfig (819.23s)
--- PASS: TestAccAWSCloudFrontDistribution_orderedCacheBehavior (825.51s)
--- PASS: TestAccAWSCloudFrontDistribution_IsIPV6EnabledConfig (828.11s)
--- PASS: TestAccAWSCloudFrontDistribution_S3Origin (902.50s)
--- PASS: TestAccAWSCloudFrontDistribution_multiOrigin (902.54s)
--- PASS: TestAccAWSCloudFrontDistribution_HTTP11Config (902.74s)
--- PASS: TestAccAWSCloudFrontDistribution_importBasic (904.77s)
--- PASS: TestAccAWSCloudFrontDistribution_S3OriginWithTags (905.26s)
--- PASS: TestAccAWSCloudFrontDistribution_customOrigin (911.00s)

@bflad bflad changed the base branch from v1.44-dev to master November 10, 2018 18:29
@bflad bflad merged commit 94ee586 into hashicorp:master Nov 12, 2018
@YakDriver YakDriver deleted the gosimple-cloudfront branch November 21, 2018 19:30
@ghost
Copy link

ghost commented Apr 2, 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 and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/cloudfront Issues and PRs that pertain to the cloudfront service. size/M Managed by automation to categorize the size of a PR. 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

Successfully merging this pull request may close these issues.

2 participants