Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/aws_batch_job_queue: Prevent panic when ComputeEnvironmentOr…
…der is updated outside Terraform (#12632) 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) ```
- Loading branch information