Skip to content

Commit

Permalink
Removed us_voices and finshed stacking AccTests
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTylerLynch authored and anGie44 committed Sep 22, 2021
1 parent 5865150 commit 8e107c8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 24 deletions.
10 changes: 5 additions & 5 deletions aws/data_source_aws_connect_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ func dataSourceAwsConnectInstance() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"use_custom_tts_voices_enabled": {
Type: schema.TypeBool,
Computed: true,
},
// "use_custom_tts_voices_enabled": {
// Type: schema.TypeBool,
// Computed: true,
// },
},
}
}
Expand Down Expand Up @@ -165,7 +165,7 @@ func dataSourceAwsConnectGetAllConnectInstanceSummaries(ctx context.Context, con

for {
input := &connect.ListInstancesInput{
MaxResults: aws.Int64(int64(tfconnect.ListInstancesMaxResults)),
MaxResults: aws.Int64(tfconnect.ListInstancesMaxResults),
}
if nextToken != "" {
input.NextToken = aws.String(nextToken)
Expand Down
19 changes: 5 additions & 14 deletions aws/data_source_aws_connect_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,16 @@ func TestAccAwsConnectInstanceDataSource_basic(t *testing.T) {
resource.TestCheckResourceAttrSet(resourceName, "contact_flow_logs_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "contact_lens_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "auto_resolve_best_voices_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "use_custom_tts_voices_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "early_media_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "status"),
resource.TestCheckResourceAttrSet(resourceName, "service_role"),
),
},
},
})
}

func TestAccAwsConnectInstanceDataSource_alias(t *testing.T) {
rName := acctest.RandomWithPrefix("datasource-test-terraform")
resourceName := "aws_connect_instance.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, connect.EndpointsID),
Providers: testAccProviders,
Steps: []resource.TestStep{
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccAwsConnectInstanceDataSourceConfigAlias(rName),
Check: resource.ComposeAggregateTestCheckFunc(
Expand All @@ -68,7 +60,6 @@ func TestAccAwsConnectInstanceDataSource_alias(t *testing.T) {
resource.TestCheckResourceAttrSet(resourceName, "contact_flow_logs_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "contact_lens_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "auto_resolve_best_voices_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "use_custom_tts_voices_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "early_media_enabled"),
resource.TestCheckResourceAttrSet(resourceName, "status"),
resource.TestCheckResourceAttrSet(resourceName, "service_role"),
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_connect_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func resourceAwsConnectInstanceCreate(ctx context.Context, d *schema.ResourceDat
output, err := conn.CreateInstanceWithContext(ctx, input)

if err != nil {
return diag.FromErr(fmt.Errorf("error reading Connect Instance (%s): %s", d.Id(), err))
return diag.FromErr(fmt.Errorf("error creating Connect Instance (%s): %s", d.Id(), err))
}

d.SetId(aws.StringValue(output.Id))
Expand Down
7 changes: 4 additions & 3 deletions aws/resource_aws_connect_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,14 @@ resource "aws_connect_instance" "test" {
func testAccAwsConnectInstanceConfigBasicFlipped(rName string) string {
return fmt.Sprintf(`
resource "aws_connect_instance" "test" {
auto_resolve_best_voices_enabled = false
contact_flow_logs_enabled = true
contact_lens_enabled = false
early_media_enabled = false
identity_management_type = "CONNECT_MANAGED"
inbound_calls_enabled = false
instance_alias = %[1]q
outbound_calls_enabled = false
auto_resolve_best_voices_enabled = false
contact_flow_logs_enabled = true
early_media_enabled = false
}
`, rName)
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/connect_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The following arguments are supported:
* `contact_flow_logs_enabled` - (Optional) Specifies Whether contact flow logs are enabled. Defaults to `false`
* `contact_lens_enabled` - (Optional) Specifies Whether contact lens is enabled. Defaults to `true`
* `auto_resolve_best_voices` - (Optional) Specifies Whether auto resolve best voices is enabled. Defaults to `true`
* `use_custom_tts_voices` - (Optional) Specifies Whether use custom tts voices is enabled. Defaults to `false`
<!-- * `use_custom_tts_voices` - (Optional) Specifies Whether use custom tts voices is enabled. Defaults to `false` -->

### Timeouts

Expand Down

0 comments on commit 8e107c8

Please sign in to comment.