Skip to content

Commit

Permalink
r/kubernetes_cluster: review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
evenh committed Jan 23, 2020
1 parent 6bf5589 commit 5630552
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ func expandKubernetesClusterNetworkProfile(input []interface{}) (*containerservi
}

func expandLoadBalancerProfile(d []interface{}, loadBalancerType string) (*containerservice.ManagedClusterLoadBalancerProfile, error) {
if len(d) == 0 {
if len(d) == 0 || d[0] == nil {
return nil, nil
}

Expand Down Expand Up @@ -1529,7 +1529,7 @@ func resourceReferencesToIds(refs *[]containerservice.ResourceReference) []strin
return ids
}

return ids
return nil
}

func flattenKubernetesClusterNetworkProfile(profile *containerservice.NetworkProfileType) []interface{} {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,9 @@ func testAccAzureRMKubernetesCluster_conflictingLoadBalancerProfile(t *testing.T
clientSecret := os.Getenv("ARM_CLIENT_SECRET")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acceptance.PreCheck(t) },
Providers: acceptance.SupportedProviders,
PreCheck: func() { acceptance.PreCheck(t) },
Providers: acceptance.SupportedProviders,
CheckDestroy: testCheckAzureRMKubernetesClusterDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMKubernetesCluster_conflictingLoadBalancerProfileConfig(data, clientId, clientSecret),
Expand Down Expand Up @@ -558,8 +559,9 @@ func testAccAzureRMKubernetesCluster_prefixedLoadBalancerProfile(t *testing.T) {
clientSecret := os.Getenv("ARM_CLIENT_SECRET")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acceptance.PreCheck(t) },
Providers: acceptance.SupportedProviders,
PreCheck: func() { acceptance.PreCheck(t) },
Providers: acceptance.SupportedProviders,
CheckDestroy: testCheckAzureRMKubernetesClusterDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMKubernetesCluster_prefixedLoadBalancerProfileConfig(data, clientId, clientSecret),
Expand Down

0 comments on commit 5630552

Please sign in to comment.