Skip to content

Commit

Permalink
🐛 (AKS data source testing.) The wrong arguments passed in.
Browse files Browse the repository at this point in the history
Updated the arguments to align with new refactored function for configuration.
  • Loading branch information
metacpp committed Aug 8, 2018
1 parent 1b8e35a commit 625b9f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 2 additions & 6 deletions azurerm/data_source_kubernetes_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ data "azurerm_kubernetes_cluster" "test" {
}

func testAccDataSourceAzureRMKubernetesCluster_advancedNetworkingAzure(rInt int, clientId string, clientSecret string, location string) string {
resource := testAccAzureRMKubernetesCluster_advancedNetworking(
rInt, clientId, clientSecret, location,
"azure", "", "", "")
resource := testAccAzureRMKubernetesCluster_advancedNetworkingMinimum(rInt, clientId, clientSecret, location, "azure")
return fmt.Sprintf(`
%s
Expand All @@ -159,9 +157,7 @@ data "azurerm_kubernetes_cluster" "test" {
}

func testAccDataSourceAzureRMKubernetesCluster_advancedNetworkingKubenet(rInt int, clientId string, clientSecret string, location string) string {
resource := testAccAzureRMKubernetesCluster_advancedNetworking(
rInt, clientId, clientSecret, location,
"kubenet", "", "", "")
resource := testAccAzureRMKubernetesCluster_advancedNetworkingComplete(rInt, clientId, clientSecret, location, "kubenet")
return fmt.Sprintf(`
%s
Expand Down
12 changes: 6 additions & 6 deletions azurerm/resource_arm_kubernetes_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func TestAccAzureRMKubernetesCluster_advancedNetworkingKubenet(t *testing.T) {
ri := acctest.RandInt()
clientId := os.Getenv("ARM_CLIENT_ID")
clientSecret := os.Getenv("ARM_CLIENT_SECRET")
config := testAccAzureRMKubernetesCluster_advancedNetworkingMinimum(ri, clientId, clientSecret, testLocation(),"kubenet")
config := testAccAzureRMKubernetesCluster_advancedNetworkingMinimum(ri, clientId, clientSecret, testLocation(), "kubenet")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -206,7 +206,7 @@ func TestAccAzureRMKubernetesCluster_advancedNetworkingKubenetComplete(t *testin
ri := acctest.RandInt()
clientId := os.Getenv("ARM_CLIENT_ID")
clientSecret := os.Getenv("ARM_CLIENT_SECRET")
config := testAccAzureRMKubernetesCluster_advancedNetworkingComplete(ri, clientId, clientSecret, testLocation(),"kubenet")
config := testAccAzureRMKubernetesCluster_advancedNetworkingComplete(ri, clientId, clientSecret, testLocation(), "kubenet")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -229,7 +229,7 @@ func TestAccAzureRMKubernetesCluster_advancedNetworkingAzure(t *testing.T) {
ri := acctest.RandInt()
clientId := os.Getenv("ARM_CLIENT_ID")
clientSecret := os.Getenv("ARM_CLIENT_SECRET")
config := testAccAzureRMKubernetesCluster_advancedNetworkingMinimum(ri, clientId, clientSecret, testLocation(),"azure")
config := testAccAzureRMKubernetesCluster_advancedNetworkingMinimum(ri, clientId, clientSecret, testLocation(), "azure")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand All @@ -252,7 +252,7 @@ func TestAccAzureRMKubernetesCluster_advancedNetworkingAzureComplete(t *testing.
ri := acctest.RandInt()
clientId := os.Getenv("ARM_CLIENT_ID")
clientSecret := os.Getenv("ARM_CLIENT_SECRET")
config := testAccAzureRMKubernetesCluster_advancedNetworkingComplete(ri, clientId, clientSecret, testLocation(),"azure")
config := testAccAzureRMKubernetesCluster_advancedNetworkingComplete(ri, clientId, clientSecret, testLocation(), "azure")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down Expand Up @@ -491,15 +491,15 @@ resource "azurerm_kubernetes_cluster" "test" {
}

func testAccAzureRMKubernetesCluster_advancedNetworkingMinimum(rInt int, clientId string, clientSecret string, location string, networkPlugin string) string {
return fmt.Sprintf(testAccAzureRMKubernetesCluster_advancedNetworking(rInt, clientId, clientSecret, location, `
return fmt.Sprintf(testAccAzureRMKubernetesCluster_advancedNetworking(rInt, clientId, clientSecret, location, `
network_profile {
network_plugin = "%s"
}
`), networkPlugin)
}

func testAccAzureRMKubernetesCluster_advancedNetworkingComplete(rInt int, clientId string, clientSecret string, location string, networkPlugin string) string {
return fmt.Sprintf(testAccAzureRMKubernetesCluster_advancedNetworking(rInt, clientId, clientSecret, location, `
return fmt.Sprintf(testAccAzureRMKubernetesCluster_advancedNetworking(rInt, clientId, clientSecret, location, `
network_profile {
network_plugin = "%s"
dns_service_ip = "10.10.0.10"
Expand Down

0 comments on commit 625b9f2

Please sign in to comment.