Procházet zdrojové kódy

Fmt fix

Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
Sean Holcomb před 1 dnem
rodič
revize
aa41c03dc6

+ 10 - 10
core/pkg/clustercache/mock.go

@@ -25,15 +25,15 @@ type MockClusterCache struct {
 func (m *MockClusterCache) Run()  {}
 func (m *MockClusterCache) Stop() {}
 
-func (m *MockClusterCache) GetAllNodes() []*Node                           { return m.Nodes }
-func (m *MockClusterCache) GetAllPods() []*Pod                             { return m.Pods }
-func (m *MockClusterCache) GetAllNamespaces() []*Namespace                 { return m.Namespaces }
-func (m *MockClusterCache) GetAllServices() []*Service                     { return m.Services }
-func (m *MockClusterCache) GetAllDaemonSets() []*DaemonSet                 { return m.DaemonSets }
-func (m *MockClusterCache) GetAllDeployments() []*Deployment               { return m.Deployments }
-func (m *MockClusterCache) GetAllStatefulSets() []*StatefulSet             { return m.StatefulSets }
-func (m *MockClusterCache) GetAllReplicaSets() []*ReplicaSet               { return m.ReplicaSets }
-func (m *MockClusterCache) GetAllPersistentVolumes() []*PersistentVolume   { return m.PersistentVolumes }
+func (m *MockClusterCache) GetAllNodes() []*Node                         { return m.Nodes }
+func (m *MockClusterCache) GetAllPods() []*Pod                           { return m.Pods }
+func (m *MockClusterCache) GetAllNamespaces() []*Namespace               { return m.Namespaces }
+func (m *MockClusterCache) GetAllServices() []*Service                   { return m.Services }
+func (m *MockClusterCache) GetAllDaemonSets() []*DaemonSet               { return m.DaemonSets }
+func (m *MockClusterCache) GetAllDeployments() []*Deployment             { return m.Deployments }
+func (m *MockClusterCache) GetAllStatefulSets() []*StatefulSet           { return m.StatefulSets }
+func (m *MockClusterCache) GetAllReplicaSets() []*ReplicaSet             { return m.ReplicaSets }
+func (m *MockClusterCache) GetAllPersistentVolumes() []*PersistentVolume { return m.PersistentVolumes }
 func (m *MockClusterCache) GetAllPersistentVolumeClaims() []*PersistentVolumeClaim {
 	return m.PersistentVolumeClaims
 }
@@ -46,4 +46,4 @@ func (m *MockClusterCache) GetAllPodDisruptionBudgets() []*PodDisruptionBudget {
 func (m *MockClusterCache) GetAllReplicationControllers() []*ReplicationController {
 	return m.ReplicationControllers
 }
-func (m *MockClusterCache) GetAllResourceQuotas() []*ResourceQuota { return m.ResourceQuotas }
+func (m *MockClusterCache) GetAllResourceQuotas() []*ResourceQuota { return m.ResourceQuotas }

+ 2 - 2
core/pkg/model/kubemodel/mock.go

@@ -129,8 +129,8 @@ func NewMockKubeModelSet(start, end time.Time) *KubeModelSet {
 		RAMBytesAllocated: 512e6,
 		RAMBytesUsageAvg:  300e6,
 		RAMBytesUsageMax:  480e6,
-		Start:            start,
-		End:              end,
+		Start:             start,
+		End:               end,
 	})
 
 	// --- Deployment ---

+ 1 - 1
modules/collector-source/pkg/scrape/index.go

@@ -45,4 +45,4 @@ func buildPVIndex(pvs []*clustercache.PersistentVolume) map[string]types.UID {
 		m[pv.Name] = pv.UID
 	}
 	return m
-}
+}

+ 1 - 1
modules/collector-source/pkg/scrape/index_test.go

@@ -72,4 +72,4 @@ func TestBuildPVIndex(t *testing.T) {
 	require.Equal(t, types.UID("uid-pv-a"), m["pv-a"])
 	require.Equal(t, types.UID("uid-pv-b"), m["pv-b"])
 	require.Len(t, m, 2)
-}
+}

+ 0 - 1
pkg/cloud/aws/provider_test.go

@@ -696,7 +696,6 @@ func Test_configUpdaterWithReaderAndType_forSpotValues(t *testing.T) {
 	}
 }
 
-
 func TestAWS_getFargatePod(t *testing.T) {
 	tests := []struct {
 		name     string

+ 0 - 1
pkg/cloud/gcp/provider_test.go

@@ -1280,7 +1280,6 @@ func (m *mockConfig) ConfigFileManager() *config.ConfigFileManager {
 	return nil
 }
 
-
 type mockMetadataClient struct{}
 
 func (m *mockMetadataClient) InstanceAttributeValue(attr string) (string, error) {

+ 0 - 1
pkg/costmodel/costmodel_test.go

@@ -530,4 +530,3 @@ func TestNodeCostAnnotations(t *testing.T) {
 		})
 	}
 }
-

+ 1 - 1
pkg/costmodel/handlers_test.go

@@ -101,4 +101,4 @@ func TestKubeModelHandler_EmptyResults_Returns200(t *testing.T) {
 	a.KubeModelHandler(w, newKubeModelRequest("1d"), httprouter.Params{})
 
 	require.Equal(t, http.StatusOK, w.Code)
-}
+}

+ 1 - 1
pkg/kubemodel/janitor_test.go

@@ -197,4 +197,4 @@ func TestJanitor_StopIsIdempotent(t *testing.T) {
 	j.Start(time.Hour)
 	j.Stop()
 	j.Stop() // second stop must not panic (closing a closed channel would panic)
-}
+}

+ 0 - 1
pkg/metrics/deploymentmetrics_test.go

@@ -523,4 +523,3 @@ func TestKubeDeploymentCollector_DefaultReplicas(t *testing.T) {
 		}
 	}
 }
-

+ 0 - 1
pkg/metrics/nodemetrics_test.go

@@ -436,4 +436,3 @@ func TestGetConditions(t *testing.T) {
 		})
 	}
 }
-

+ 0 - 1
pkg/metrics/podlabelmetrics_test.go

@@ -42,4 +42,3 @@ func TestWhitelist(t *testing.T) {
 	}
 
 }
-

+ 0 - 1
pkg/metrics/podmetrics_test.go

@@ -845,4 +845,3 @@ func TestPodPhaseMetrics(t *testing.T) {
 		}
 	}
 }
-

+ 0 - 1
pkg/metrics/pvcmetrics_test.go

@@ -105,4 +105,3 @@ func TestKubePVCMetrics_UIDLabel(t *testing.T) {
 	}
 	t.Error("UID label not found in metric")
 }
-

+ 0 - 1
pkg/metrics/pvmetrics_test.go

@@ -107,4 +107,3 @@ func TestKubePVMetrics_UIDLabel(t *testing.T) {
 	}
 	t.Error("UID label not found in metric")
 }
-

+ 0 - 1
pkg/metrics/servicemetrics_test.go

@@ -215,4 +215,3 @@ func TestServiceSelectorLabelsMetric_EmptyLabels(t *testing.T) {
 		t.Errorf("Expected %d labels, got %d", expectedCount, len(dtoMetric.Label))
 	}
 }
-

+ 0 - 1
pkg/metrics/statefulsetmetrics_test.go

@@ -284,4 +284,3 @@ func TestStatefulsetMatchLabelsMetric_MissingFields(t *testing.T) {
 		})
 	}
 }
-