Skip to content

Commit

Permalink
Renaming things per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsomesan authored and tombuildsstuff committed May 16, 2019
1 parent aee5af7 commit a53f6d7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion azurerm/data_source_container_orchestrator_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func dataSourceArmKubernetesServiceVersionsRead(d *schema.ResourceData, meta int
listResp, err := client.ListOrchestrators(ctx, location, "managedClusters")
if err != nil {
if utils.ResponseWasNotFound(listResp.Response) {
return fmt.Errorf("Error: Container Orchestrators not found for location %q", location)
return fmt.Errorf("Error: No Kubernetes Service versions found for location %q", location)
}
return fmt.Errorf("Error retrieving Kubernetes Versions in %q: %+v", location, err)
}
Expand Down
20 changes: 10 additions & 10 deletions azurerm/data_source_container_orchestrator_versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

const k8sVersionRX = `[0-9]+\.[0-9]+\.[0-9]*`

func TestAccDataSourceAzureRMContainerOrchestratorVersions_basic(t *testing.T) {
dataSourceName := "data.azurerm_container_orchestrator_versions.test"
func TestAccDataSourceAzureRMKubernetesServiceVersions_basic(t *testing.T) {
dataSourceName := "data.azurerm_kubernetes_service_versions.test"
location := testLocation()
kvrx := regexp.MustCompile(k8sVersionRX)

Expand All @@ -20,7 +20,7 @@ func TestAccDataSourceAzureRMContainerOrchestratorVersions_basic(t *testing.T) {
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccDataSourceAzureRMContainerOrchestratorVersions_basic(location),
Config: testAccDataSourceAzureRMKubernetesServiceVersions_basic(location),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(dataSourceName, "versions.#"),
resource.TestMatchResourceAttr(dataSourceName, "versions.0", kvrx),
Expand All @@ -32,8 +32,8 @@ func TestAccDataSourceAzureRMContainerOrchestratorVersions_basic(t *testing.T) {
})
}

func TestAccDataSourceAzureRMContainerOrchestratorVersions_filtered(t *testing.T) {
dataSourceName := "data.azurerm_container_orchestrator_versions.test"
func TestAccDataSourceAzureRMKubernetesServiceVersions_filtered(t *testing.T) {
dataSourceName := "data.azurerm_kubernetes_service_versions.test"
location := testLocation()
kvrx := regexp.MustCompile(k8sVersionRX)

Expand All @@ -42,7 +42,7 @@ func TestAccDataSourceAzureRMContainerOrchestratorVersions_filtered(t *testing.T
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccDataSourceAzureRMContainerOrchestratorVersions_filtered(location),
Config: testAccDataSourceAzureRMKubernetesServiceVersions_filtered(location),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(dataSourceName, "versions.#"),
resource.TestMatchResourceAttr(dataSourceName, "versions.0", kvrx),
Expand All @@ -54,17 +54,17 @@ func TestAccDataSourceAzureRMContainerOrchestratorVersions_filtered(t *testing.T
})
}

func testAccDataSourceAzureRMContainerOrchestratorVersions_basic(location string) string {
func testAccDataSourceAzureRMKubernetesServiceVersions_basic(location string) string {
return fmt.Sprintf(`
data "azurerm_container_orchestrator_versions" "test" {
data "azurerm_kubernetes_service_versions" "test" {
location = "%s"
}
`, location)
}

func testAccDataSourceAzureRMContainerOrchestratorVersions_filtered(location string) string {
func testAccDataSourceAzureRMKubernetesServiceVersions_filtered(location string) string {
return fmt.Sprintf(`
data "azurerm_container_orchestrator_versions" "test" {
data "azurerm_kubernetes_service_versions" "test" {
location = "%s"
version_prefix = "1."
}
Expand Down
2 changes: 1 addition & 1 deletion azurerm/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func Provider() terraform.ResourceProvider {
"azurerm_builtin_role_definition": dataSourceArmBuiltInRoleDefinition(),
"azurerm_cdn_profile": dataSourceArmCdnProfile(),
"azurerm_client_config": dataSourceArmClientConfig(),
"azurerm_kubernetes_service_versions": dataSourceArmKubernetesServiceVersions(),
"azurerm_kubernetes_service_versions": dataSourceArmKubernetesServiceVersions(),
"azurerm_container_registry": dataSourceArmContainerRegistry(),
"azurerm_cosmosdb_account": dataSourceArmCosmosDBAccount(),
"azurerm_data_lake_store": dataSourceArmDataLakeStoreAccount(),
Expand Down

0 comments on commit a53f6d7

Please sign in to comment.