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

Import test refactor for cognito resources #10599

Merged
merged 1 commit into from
Oct 29, 2019
Merged

Conversation

ryndaniels
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Relates #8944

Release note for CHANGELOG:

NONE

Output from acceptance testing:

  • NOTE: the TestAccAWSCognitoIdentityPool_openidConnectProviderArns failure is not new
$ make testacc TESTARGS="-run=TestAccAWSCognitoIdentityPool_"     
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSCognitoIdentityPool_ -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSCognitoIdentityPool_basic
=== PAUSE TestAccAWSCognitoIdentityPool_basic
=== RUN   TestAccAWSCognitoIdentityPool_supportedLoginProviders
=== PAUSE TestAccAWSCognitoIdentityPool_supportedLoginProviders
=== RUN   TestAccAWSCognitoIdentityPool_openidConnectProviderArns
=== PAUSE TestAccAWSCognitoIdentityPool_openidConnectProviderArns
=== RUN   TestAccAWSCognitoIdentityPool_samlProviderArns
=== PAUSE TestAccAWSCognitoIdentityPool_samlProviderArns
=== RUN   TestAccAWSCognitoIdentityPool_cognitoIdentityProviders
=== PAUSE TestAccAWSCognitoIdentityPool_cognitoIdentityProviders
=== RUN   TestAccAWSCognitoIdentityPool_addingNewProviderKeepsOldProvider
--- PASS: TestAccAWSCognitoIdentityPool_addingNewProviderKeepsOldProvider (63.78s)
=== CONT  TestAccAWSCognitoIdentityPool_basic
=== CONT  TestAccAWSCognitoIdentityPool_samlProviderArns
=== CONT  TestAccAWSCognitoIdentityPool_cognitoIdentityProviders
=== CONT  TestAccAWSCognitoIdentityPool_openidConnectProviderArns
=== CONT  TestAccAWSCognitoIdentityPool_supportedLoginProviders
--- FAIL: TestAccAWSCognitoIdentityPool_openidConnectProviderArns (37.74s)
    testing.go:569: Step 2 error: After applying this step, the plan was not empty:
        
        DIFF:
        
        UPDATE: aws_cognito_identity_pool.main
          allow_unauthenticated_identities: "false" => "false"
          arn:                              "arn:aws:cognito-identity:us-west-2:187416307283:identitypool/us-west-2:00e43a2d-dffb-4be3-bd2c-71a025907279" => "arn:aws:cognito-identity:us-west-2:187416307283:identitypool/us-west-2:00e43a2d-dffb-4be3-bd2c-71a025907279"
          cognito_identity_providers.#:     "0" => "0"
          developer_provider_name:          "" => ""
          id:                               "us-west-2:00e43a2d-dffb-4be3-bd2c-71a025907279" => "us-west-2:00e43a2d-dffb-4be3-bd2c-71a025907279"
          identity_pool_name:               "identity pool 2yp3gvvsik" => "identity pool 2yp3gvvsik"
          openid_connect_provider_arns.#:   "2" => "2"
          openid_connect_provider_arns.0:   "arn:aws:iam::123456789012:oidc-provider/bar.example.com" => "arn:aws:iam::123456789012:oidc-provider/foo.example.com"
          openid_connect_provider_arns.1:   "arn:aws:iam::123456789012:oidc-provider/foo.example.com" => "arn:aws:iam::123456789012:oidc-provider/bar.example.com"
          saml_provider_arns.#:             "0" => "0"
        
        
        
        STATE:
        
        aws_cognito_identity_pool.main:
          ID = us-west-2:00e43a2d-dffb-4be3-bd2c-71a025907279
          provider = provider.aws
          allow_unauthenticated_identities = false
          arn = arn:aws:cognito-identity:us-west-2:187416307283:identitypool/us-west-2:00e43a2d-dffb-4be3-bd2c-71a025907279
          developer_provider_name = 
          identity_pool_name = identity pool 2yp3gvvsik
          openid_connect_provider_arns.# = 2
          openid_connect_provider_arns.0 = arn:aws:iam::123456789012:oidc-provider/bar.example.com
          openid_connect_provider_arns.1 = arn:aws:iam::123456789012:oidc-provider/foo.example.com
--- PASS: TestAccAWSCognitoIdentityPool_basic (44.56s)
--- PASS: TestAccAWSCognitoIdentityPool_supportedLoginProviders (59.57s)
--- PASS: TestAccAWSCognitoIdentityPool_cognitoIdentityProviders (59.61s)
--- PASS: TestAccAWSCognitoIdentityPool_samlProviderArns (65.25s)
FAIL
FAIL    github.com/terraform-providers/terraform-provider-aws/aws       130.443s

make testacc TESTARGS="-run=TestAccAWSCognitoUserGroup_"     
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSCognitoUserGroup_ -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSCognitoUserGroup_basic
=== PAUSE TestAccAWSCognitoUserGroup_basic
=== RUN   TestAccAWSCognitoUserGroup_complex
=== PAUSE TestAccAWSCognitoUserGroup_complex
=== RUN   TestAccAWSCognitoUserGroup_RoleArn
=== PAUSE TestAccAWSCognitoUserGroup_RoleArn
=== CONT  TestAccAWSCognitoUserGroup_basic
=== CONT  TestAccAWSCognitoUserGroup_RoleArn
=== CONT  TestAccAWSCognitoUserGroup_complex
--- PASS: TestAccAWSCognitoUserGroup_basic (45.78s)
--- PASS: TestAccAWSCognitoUserGroup_RoleArn (46.61s)
--- PASS: TestAccAWSCognitoUserGroup_complex (51.64s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       53.111s

make testacc TESTARGS="-run=TestAccAWSCognitoUserPoolClient_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSCognitoUserPoolClient_ -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSCognitoUserPoolClient_basic
=== PAUSE TestAccAWSCognitoUserPoolClient_basic
=== RUN   TestAccAWSCognitoUserPoolClient_RefreshTokenValidity
=== PAUSE TestAccAWSCognitoUserPoolClient_RefreshTokenValidity
=== RUN   TestAccAWSCognitoUserPoolClient_Name
=== PAUSE TestAccAWSCognitoUserPoolClient_Name
=== RUN   TestAccAWSCognitoUserPoolClient_allFields
=== PAUSE TestAccAWSCognitoUserPoolClient_allFields
=== RUN   TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== PAUSE TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== CONT  TestAccAWSCognitoUserPoolClient_basic
=== CONT  TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField
=== CONT  TestAccAWSCognitoUserPoolClient_RefreshTokenValidity
=== CONT  TestAccAWSCognitoUserPoolClient_Name
=== CONT  TestAccAWSCognitoUserPoolClient_allFields
--- PASS: TestAccAWSCognitoUserPoolClient_basic (36.80s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (37.08s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (49.01s)
--- PASS: TestAccAWSCognitoUserPoolClient_RefreshTokenValidity (55.10s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (58.16s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       59.593s

make testacc TESTARGS="-run=TestAccAWSCognitoUserPool_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSCognitoUserPool_ -timeout 120m
?       github.com/terraform-providers/terraform-provider-aws   [no test files]
=== RUN   TestAccAWSCognitoUserPool_basic
=== PAUSE TestAccAWSCognitoUserPool_basic
=== RUN   TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== RUN   TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== PAUSE TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== RUN   TestAccAWSCognitoUserPool_withDeviceConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withDeviceConfiguration
=== RUN   TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== PAUSE TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== RUN   TestAccAWSCognitoUserPool_withSmsVerificationMessage
=== PAUSE TestAccAWSCognitoUserPool_withSmsVerificationMessage
=== RUN   TestAccAWSCognitoUserPool_withEmailConfiguration
--- SKIP: TestAccAWSCognitoUserPool_withEmailConfiguration (0.00s)
    resource_aws_cognito_user_pool_test.go:294: 'TEST_AWS_SES_VERIFIED_EMAIL_ARN' not set, skipping test.
=== RUN   TestAccAWSCognitoUserPool_withSmsConfiguration
=== PAUSE TestAccAWSCognitoUserPool_withSmsConfiguration
=== RUN   TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
=== PAUSE TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
=== RUN   TestAccAWSCognitoUserPool_withTags
=== PAUSE TestAccAWSCognitoUserPool_withTags
=== RUN   TestAccAWSCognitoUserPool_withAliasAttributes
=== PAUSE TestAccAWSCognitoUserPool_withAliasAttributes
=== RUN   TestAccAWSCognitoUserPool_withPasswordPolicy
=== PAUSE TestAccAWSCognitoUserPool_withPasswordPolicy
=== RUN   TestAccAWSCognitoUserPool_withLambdaConfig
=== PAUSE TestAccAWSCognitoUserPool_withLambdaConfig
=== RUN   TestAccAWSCognitoUserPool_withSchemaAttributes
=== PAUSE TestAccAWSCognitoUserPool_withSchemaAttributes
=== RUN   TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== PAUSE TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== RUN   TestAccAWSCognitoUserPool_update
=== PAUSE TestAccAWSCognitoUserPool_update
=== CONT  TestAccAWSCognitoUserPool_basic
=== CONT  TestAccAWSCognitoUserPool_withTags
=== CONT  TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration
=== CONT  TestAccAWSCognitoUserPool_withSchemaAttributes
=== CONT  TestAccAWSCognitoUserPool_withLambdaConfig
=== CONT  TestAccAWSCognitoUserPool_withAliasAttributes
=== CONT  TestAccAWSCognitoUserPool_withSmsConfigurationUpdated
=== CONT  TestAccAWSCognitoUserPool_withSmsConfiguration
=== CONT  TestAccAWSCognitoUserPool_withSmsVerificationMessage
=== CONT  TestAccAWSCognitoUserPool_withEmailVerificationMessage
=== CONT  TestAccAWSCognitoUserPool_withAdvancedSecurityMode
=== CONT  TestAccAWSCognitoUserPool_withDeviceConfiguration
=== CONT  TestAccAWSCognitoUserPool_update
=== CONT  TestAccAWSCognitoUserPool_withVerificationMessageTemplate
=== CONT  TestAccAWSCognitoUserPool_withPasswordPolicy
--- PASS: TestAccAWSCognitoUserPool_basic (28.71s)
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (45.02s)
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (45.04s)
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (45.31s)
--- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (45.35s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (45.43s)
--- PASS: TestAccAWSCognitoUserPool_withTags (45.43s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (45.49s)
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (45.50s)
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (47.93s)
--- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (48.91s)
--- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (62.00s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (62.29s)
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (71.07s)
--- PASS: TestAccAWSCognitoUserPool_update (85.56s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       86.996s

@ryndaniels ryndaniels requested review from bflad and a team October 22, 2019 12:50
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. service/cognito tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 22, 2019
@bflad bflad self-assigned this Oct 25, 2019
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 (as noted above, test failure known)

--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError (11.81s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError (12.25s)
--- SKIP: TestAccAWSCognitoUserPoolDomain_custom (0.00s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError (16.95s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFields (20.13s)
--- PASS: TestAccAWSCognitoUserPoolClient_basic (20.94s)
--- FAIL: TestAccAWSCognitoIdentityPool_openidConnectProviderArns (26.63s)
--- PASS: TestAccAWSCognitoUserPoolClient_RefreshTokenValidity (32.47s)
--- PASS: TestAccAWSCognitoIdentityPool_basic (33.08s)
--- SKIP: TestAccAWSCognitoUserPool_withEmailConfiguration (0.00s)
--- PASS: TestAccAWSCognitoIdentityPoolWithTags (33.41s)
--- PASS: TestAccAWSCognitoUserPoolClient_Name (33.96s)
--- PASS: TestAccAWSCognitoUserGroup_basic (34.39s)
--- PASS: TestAccAWSCognitoUserPoolClient_allFieldsUpdatingOneField (34.88s)
--- PASS: TestAccAWSCognitoUserPoolDomain_basic (22.77s)
--- PASS: TestAccAWSCognitoUserPool_basic (22.25s)
--- PASS: TestAccAWSCognitoUserGroup_RoleArn (35.62s)
--- PASS: TestAccAWSCognitoUserGroup_complex (37.27s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_basic (38.93s)
--- PASS: TestAccAWSCognitoIdentityPool_supportedLoginProviders (40.83s)
--- PASS: TestAccAWSCognitoIdentityPool_addingNewProviderKeepsOldProvider (42.08s)
--- PASS: TestAccAWSCognitoIdentityPool_cognitoIdentityProviders (42.66s)
--- PASS: TestAccAWSCognitoIdentityPool_samlProviderArns (45.12s)
--- PASS: TestAccAWSCognitoUserPool_withAdminCreateUserConfiguration (29.59s)
--- PASS: TestAccAWSCognitoUserPool_withDeviceConfiguration (28.86s)
--- PASS: TestAccAWSCognitoUserPool_withEmailVerificationMessage (25.55s)
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings (54.59s)
--- PASS: TestAccAWSCognitoUserPool_withSmsVerificationMessage (21.98s)
--- PASS: TestAccAWSCognitoUserPool_withAdvancedSecurityMode (35.08s)
--- PASS: TestAccAWSCognitoUserPool_withTags (21.14s)
--- PASS: TestAccAWSCognitoUserPool_withPasswordPolicy (21.25s)
--- PASS: TestAccAWSCognitoUserPool_withVerificationMessageTemplate (20.86s)
--- PASS: TestAccAWSCognitoUserPool_withAliasAttributes (22.40s)
--- PASS: TestAccAWSCognitoUserPool_withSchemaAttributes (22.32s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfiguration (35.43s)
--- PASS: TestAccAWSCognitoUserPool_withLambdaConfig (37.19s)
--- PASS: TestAccAWSCognitoUserPool_withSmsConfigurationUpdated (41.18s)
--- PASS: TestAccAWSCognitoUserPool_update (50.02s)

@bflad bflad added this to the v2.34.0 milestone Oct 25, 2019
@ryndaniels ryndaniels merged commit 6bd6476 into master Oct 29, 2019
@ryndaniels ryndaniels deleted the rfd-at002-cognito branch October 29, 2019 09:17
@ghost
Copy link

ghost commented Mar 29, 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 Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/XXL Managed by automation to categorize the size of a PR. 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