Skip to content

Commit

Permalink
hdinsight_interactive_query_cluster: Removing unsupported acc test
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaweitao001 committed May 31, 2023
1 parent d70e6ea commit a2b5372
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var hdInsightInteractiveQueryClusterWorkerNodeDefinition = HDInsightNodeDefiniti
CanSpecifyInstanceCount: true,
MinInstanceCount: 1,
CanSpecifyDisks: false,
CanAutoScaleByCapacity: true,
CanAutoScaleByCapacity: false,
CanAutoScaleOnSchedule: true,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,21 +567,6 @@ func TestAccAzureRMHDInsightInteractiveQueryCluster_autoscale(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_hdinsight_interactive_query_cluster", "test")
r := HDInsightInteractiveQueryClusterResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.autoscale_capacity(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("https_endpoint").Exists(),
check.That(data.ResourceName).Key("ssh_endpoint").Exists(),
),
},
data.ImportStep("roles.0.head_node.0.password",
"roles.0.head_node.0.vm_size",
"roles.0.worker_node.0.password",
"roles.0.worker_node.0.vm_size",
"roles.0.zookeeper_node.0.password",
"roles.0.zookeeper_node.0.vm_size",
"storage_account"),
{
Config: r.autoscale_schedule(data),
Check: acceptance.ComposeTestCheckFunc(
Expand Down Expand Up @@ -2006,55 +1991,6 @@ resource "azurerm_hdinsight_interactive_query_cluster" "test" {
`, r.template(data), data.RandomString, data.RandomInteger, data.RandomInteger)
}

func (r HDInsightInteractiveQueryClusterResource) autoscale_capacity(data acceptance.TestData) string {
return fmt.Sprintf(`
%s
resource "azurerm_hdinsight_interactive_query_cluster" "test" {
name = "acctesthdi-%d"
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
cluster_version = "4.0"
tier = "Standard"
component_version {
interactive_hive = "3.1"
}
gateway {
username = "acctestusrgw"
password = "TerrAform123!"
}
storage_account {
storage_container_id = azurerm_storage_container.test.id
storage_account_key = azurerm_storage_account.test.primary_access_key
is_default = true
}
roles {
head_node {
vm_size = "Standard_D13_V2"
username = "acctestusrvm"
password = "AccTestvdSC4daf986!"
}
worker_node {
vm_size = "Standard_D14_V2"
username = "acctestusrvm"
password = "AccTestvdSC4daf986!"
target_instance_count = 2
autoscale {
capacity {
min_instance_count = 2
max_instance_count = 3
}
}
}
zookeeper_node {
vm_size = "Standard_A4_V2"
username = "acctestusrvm"
password = "AccTestvdSC4daf986!"
}
}
}
`, r.template(data), data.RandomInteger)
}

func (r HDInsightInteractiveQueryClusterResource) autoscale_schedule(data acceptance.TestData) string {
return fmt.Sprintf(`
%s
Expand Down
12 changes: 0 additions & 12 deletions website/docs/r/hdinsight_interactive_query_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -363,20 +363,8 @@ A `extension` block supports the following:

An `autoscale` block supports the following:

* `capacity` - (Optional) A `capacity` block as defined below.

* `recurrence` - (Optional) A `recurrence` block as defined below.

-> **NOTE:** Either a `capacity` or `recurrence` block must be specified - but not both.

---

A `capacity` block supports the following:

* `max_instance_count` - (Required) The maximum number of worker nodes to autoscale to based on the cluster's activity.

* `min_instance_count` - (Required) The minimum number of worker nodes to autoscale to based on the cluster's activity.

---

A `recurrence` block supports the following:
Expand Down

0 comments on commit a2b5372

Please sign in to comment.