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

resource/aws_batch_job_queue: Prevent panic when ComputeEnvironmentOrder is updated outside Terraform #12632

Merged
merged 1 commit into from
Apr 29, 2020

Commits on Apr 2, 2020

  1. resource/aws_batch_job_queue: Prevent panic when ComputeEnvironmentOr…

    …der is updated outside Terraform
    
    Reference: #8083
    
    Also modernizes the testing.
    
    Previously:
    
    ```
    === CONT  TestAccAWSBatchJobQueue_ComputeEnvironments_ExternalOrderUpdate
    panic: runtime error: index out of range [1] with length 1
    
    goroutine 1306 [running]:
    github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsBatchJobQueueRead(0xc001117c70, 0x62e4cc0, 0xc0003bcf00, 0xc001117c70, 0x0)
      /Users/bflad/src/github.com/terraform-providers/terraform-provider-aws-deux/aws/resource_aws_batch_job_queue.go:110 +0x55a
    github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0005df580, 0xc00104ae60, 0x62e4cc0, 0xc0003bcf00, 0xc000c7ec30, 0x0, 0x0)
      /Users/bflad/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.8.0/helper/schema/resource.go:455 +0x119
    ```
    
    Output from acceptance testing:
    
    ```
    --- PASS: TestAccAWSBatchJobQueue_basic (85.28s)
    --- PASS: TestAccAWSBatchJobQueue_disappears (87.06s)
    --- PASS: TestAccAWSBatchJobQueue_ComputeEnvironments_ExternalOrderUpdate (98.67s)
    --- PASS: TestAccAWSBatchJobQueue_Priority (120.72s)
    --- PASS: TestAccAWSBatchJobQueue_State (127.15s)
    ```
    bflad committed Apr 2, 2020
    Configuration menu
    Copy the full SHA
    cb0dec1 View commit details
    Browse the repository at this point in the history