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

tests/provider: Replace deleted AWS Managed IAM Policy AmazonEC2SpotFleetRole, use data sources in those tests #10700

Merged
merged 1 commit into from
Nov 1, 2019

Commits on Oct 31, 2019

  1. tests/provider: Replace deleted AWS Managed IAM Policy AmazonEC2SpotF…

    …leetRole, use data sources in those tests
    
    Starting yesterday, October 30th, the `AmazonEC2SpotFleetRole` AWS managed IAM policy is no longer available, which was causing test failures:
    
    ```
    --- FAIL: TestAccAWSAppautoScalingTarget_spotFleetRequest (605.77s)
        testing.go:615: Step 0 error: errors during apply:
    
            Error: Error attaching policy arn:aws:iam::aws:policy/service-role/AmazonEC2SpotFleetRole to IAM Role terraform-20191031031853283200000001: NoSuchEntity: Policy arn:aws:iam::aws:policy/service-role/AmazonEC2SpotFleetRole does not exist or is not attachable.
    ```
    
    Here we switch to the newer `AmazonEC2SpotFleetTaggingRole`. While adjusting these tests anyways (such as the Batch base configuration), also fixed some other region/partition issues such as:
    
    ```
    --- FAIL: TestAccAWSAppautoScalingTarget_emrCluster (64.87s)
        testing.go:615: Step 0 error: errors during apply:
    
            Error: Error waiting for EMR Cluster state to be "WAITING" or "RUNNING": TERMINATING: VALIDATION_ERROR: The requested instance type m3.xlarge is not supported in the requested availability zone. Learn more at https://docs.aws.amazon.com/console/elasticmapreduce/ERROR_noinstancetype
    ```
    
    Output from acceptance testing:
    
    ```
    --- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage (21.92s)
    --- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (30.60s)
    --- PASS: TestAccAWSBatchComputeEnvironment_createUnmanaged (53.53s)
    --- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithTags (53.69s)
    --- PASS: TestAccAWSBatchComputeEnvironment_createSpot (58.61s)
    --- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (59.71s)
    --- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (60.56s)
    --- PASS: TestAccAWSAppautoScalingTarget_spotFleetRequest (70.48s)
    --- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (71.45s)
    --- PASS: TestAccAWSAppautoscalingScheduledAction_SpotFleet (73.48s)
    --- PASS: TestAccAWSBatchComputeEnvironment_updateMaxvCpus (79.34s)
    --- PASS: TestAccAWSAppautoScalingPolicy_spotFleetRequest (81.54s)
    --- PASS: TestAccAWSBatchComputeEnvironment_updateInstanceType (81.85s)
    --- PASS: TestAccAWSBatchComputeEnvironment_updateState (84.27s)
    --- PASS: TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName (93.77s)
    --- PASS: TestAccAWSAppautoscalingScheduledAction_EMR (376.28s)
    --- PASS: TestAccAWSAppautoScalingTarget_emrCluster (437.48s)
    ```
    bflad committed Oct 31, 2019
    Configuration menu
    Copy the full SHA
    f2a7678 View commit details
    Browse the repository at this point in the history