Przeglądaj źródła

Fix tests

Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
Sean Holcomb 1 miesiąc temu
rodzic
commit
61856d9991

+ 0 - 3
modules/collector-source/pkg/scrape/clustercache.go

@@ -571,9 +571,6 @@ func (ccs *ClusterCacheScraper) scrapePods(
 			labels := map[string]string{
 				source.PodLabel:       unmountedPVsContainer,
 				source.NamespaceLabel: pvc.Namespace,
-				source.UIDLabel:       "",
-				source.NodeLabel:      "",
-				source.InstanceLabel:  "",
 				source.PVCLabel:       pvc.Claim,
 				source.PVLabel:        pvc.VolumeName,
 			}

+ 11 - 14
modules/collector-source/pkg/scrape/clustercache_test.go

@@ -669,6 +669,17 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
 					Value:          1024,
 					AdditionalInfo: nil,
 				},
+				{
+					Name: metric.PodPVCAllocation,
+					Labels: map[string]string{
+						source.PodLabel:       unmountedPVsContainer,
+						source.NamespaceLabel: "namespace1",
+						source.PVCLabel:       "pvc1",
+						source.PVLabel:        "vol1",
+					},
+					Value:          4096,
+					AdditionalInfo: nil,
+				},
 			},
 		},
 		{
@@ -859,20 +870,6 @@ func Test_kubernetesScraper_scrapePods(t *testing.T) {
 					Value:          1024,
 					AdditionalInfo: nil,
 				},
-				{
-					Name: metric.PodPVCAllocation,
-					Labels: map[string]string{
-						source.InstanceLabel:  "",
-						source.NamespaceLabel: "namespace1",
-						source.NodeLabel:      "",
-						source.PVLabel:        "vol1",
-						source.PVCLabel:       "pvc1",
-						source.PodLabel:       "unmounted-pvs",
-						source.UIDLabel:       "",
-					},
-					Value:          4096,
-					AdditionalInfo: nil,
-				},
 			},
 		},
 	}