From 07674fa8463dd26b0512bf62aec614a55e2e99f5 Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Sat, 10 Mar 2018 13:53:50 -0700 Subject: [PATCH] Updating to use CoreV1 in unit tests --- pkg/validation/validate_cluster_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/validation/validate_cluster_test.go b/pkg/validation/validate_cluster_test.go index 82b512490a..22c540b030 100644 --- a/pkg/validation/validate_cluster_test.go +++ b/pkg/validation/validate_cluster_test.go @@ -28,7 +28,7 @@ import ( ) func Test_ValidateClusterPositive(t *testing.T) { - nodeList, err := dummyClient("true", "true").Core().Nodes().List(metav1.ListOptions{}) + nodeList, err := dummyClient("true", "true").CoreV1().Nodes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -44,7 +44,7 @@ func Test_ValidateClusterPositive(t *testing.T) { } func Test_ValidateClusterMasterAndNodeNotReady(t *testing.T) { - nodeList, err := dummyClient("false", "false").Core().Nodes().List(metav1.ListOptions{}) + nodeList, err := dummyClient("false", "false").CoreV1().Nodes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -60,7 +60,7 @@ func Test_ValidateClusterMasterAndNodeNotReady(t *testing.T) { } func Test_ValidateClusterComponents(t *testing.T) { - nodeList, err := dummyClient("true", "true").Core().Nodes().List(metav1.ListOptions{}) + nodeList, err := dummyClient("true", "true").CoreV1().Nodes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -77,7 +77,7 @@ func Test_ValidateClusterComponents(t *testing.T) { } func Test_ValidateClusterPods(t *testing.T) { - nodeList, err := dummyClient("true", "true").Core().Nodes().List(metav1.ListOptions{}) + nodeList, err := dummyClient("true", "true").CoreV1().Nodes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -94,7 +94,7 @@ func Test_ValidateClusterPods(t *testing.T) { } func Test_ValidateClusterNodeNotReady(t *testing.T) { - nodeList, err := dummyClient("true", "false").Core().Nodes().List(metav1.ListOptions{}) + nodeList, err := dummyClient("true", "false").CoreV1().Nodes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -110,7 +110,7 @@ func Test_ValidateClusterNodeNotReady(t *testing.T) { } func Test_ValidateClusterMastersNotEnough(t *testing.T) { - nodeList, err := dummyClient("true", "true").Core().Nodes().List(metav1.ListOptions{}) + nodeList, err := dummyClient("true", "true").CoreV1().Nodes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -126,7 +126,7 @@ func Test_ValidateClusterMastersNotEnough(t *testing.T) { } func Test_ValidateNodesNotEnough(t *testing.T) { - nodeList, err := dummyClient("true", "true").Core().Nodes().List(metav1.ListOptions{}) + nodeList, err := dummyClient("true", "true").CoreV1().Nodes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err)