Explorar o código

Update mock function names

Sean Holcomb %!s(int64=5) %!d(string=hai) anos
pai
achega
e33efe5690

+ 19 - 19
pkg/kubecost/allocation_test.go

@@ -530,7 +530,7 @@ func printAllocationSet(msg string, as *AllocationSet) {
 
 func TestAllocationSet_AggregateBy(t *testing.T) {
 	// Test AggregateBy against the following workload topology, which is
-	// generated by GenerateAllocationSet:
+	// generated by GenerateMockAllocationSet:
 
 	// | Hierarchy                              | Cost |  CPU |  RAM |  GPU |   PV |  Net |  LB  |
 	// +----------------------------------------+------+------+------+------+------+------+------+
@@ -1543,9 +1543,9 @@ func TestAllocationSet_AggregateBy(t *testing.T) {
 	for name, testcase := range cases {
 		t.Run(name, func(t *testing.T) {
 			if testcase.aggOpts != nil && testcase.aggOpts.IdleByNode {
-				as = GenerateAllocationSetNodeIdle(testcase.start)
+				as = GenerateMockAllocationSetNodeIdle(testcase.start)
 			} else {
-				as = GenerateAllocationSetClusterIdle(testcase.start)
+				as = GenerateMockAllocationSetClusterIdle(testcase.start)
 			}
 			err = as.AggregateBy(testcase.aggBy, testcase.aggOpts)
 			assertAllocationSetTotals(t, as, name, err, testcase.numResults, testcase.totalCost)
@@ -1567,9 +1567,9 @@ func TestAllocationSet_ComputeIdleAllocations(t *testing.T) {
 	start := end.Add(-day)
 
 	// Generate AllocationSet without idle allocations
-	as = GenerateAllocationSet(start)
+	as = GenerateMockAllocationSet(start)
 
-	assetSets := GenerateAssetSets(start, end)
+	assetSets := GenerateMockAssetSets(start, end)
 
 	cases := map[string]struct {
 		allocationSet *AllocationSet
@@ -1653,9 +1653,9 @@ func TestAllocationSet_ComputeIdleAllocationsPerNode(t *testing.T) {
 	start := end.Add(-day)
 
 	// Generate AllocationSet without idle allocations
-	as = GenerateAllocationSet(start)
+	as = GenerateMockAllocationSet(start)
 
-	assetSets := GenerateAssetSets(start, end)
+	assetSets := GenerateMockAssetSets(start, end)
 
 	cases := map[string]struct {
 		allocationSet *AllocationSet
@@ -1831,10 +1831,10 @@ func TestAllocationSetRange_Accumulate(t *testing.T) {
 	}
 
 	todayAS := NewAllocationSet(today, tomorrow)
-	todayAS.Set(NewUnitAllocation("", today, day, nil))
+	todayAS.Set(NewMockUnitAllocation("", today, day, nil))
 
 	yesterdayAS := NewAllocationSet(yesterday, today)
-	yesterdayAS.Set(NewUnitAllocation("", yesterday, day, nil))
+	yesterdayAS.Set(NewMockUnitAllocation("", yesterday, day, nil))
 
 	// Accumulate non-nil with nil should result in copy of non-nil, regardless of order
 	result, err = NewAllocationSetRange(nil, todayAS).Accumulate()
@@ -1964,22 +1964,22 @@ func TestAllocationSetRange_InsertRange(t *testing.T) {
 	today := time.Now().UTC().Truncate(day)
 	tomorrow := time.Now().UTC().Truncate(day).Add(day)
 
-	unit := NewUnitAllocation("", today, day, nil)
+	unit := NewMockUnitAllocation("", today, day, nil)
 
 	ago2dAS := NewAllocationSet(ago2d, yesterday)
-	ago2dAS.Set(NewUnitAllocation("a", ago2d, day, nil))
-	ago2dAS.Set(NewUnitAllocation("b", ago2d, day, nil))
-	ago2dAS.Set(NewUnitAllocation("c", ago2d, day, nil))
+	ago2dAS.Set(NewMockUnitAllocation("a", ago2d, day, nil))
+	ago2dAS.Set(NewMockUnitAllocation("b", ago2d, day, nil))
+	ago2dAS.Set(NewMockUnitAllocation("c", ago2d, day, nil))
 
 	yesterdayAS := NewAllocationSet(yesterday, today)
-	yesterdayAS.Set(NewUnitAllocation("a", yesterday, day, nil))
-	yesterdayAS.Set(NewUnitAllocation("b", yesterday, day, nil))
-	yesterdayAS.Set(NewUnitAllocation("c", yesterday, day, nil))
+	yesterdayAS.Set(NewMockUnitAllocation("a", yesterday, day, nil))
+	yesterdayAS.Set(NewMockUnitAllocation("b", yesterday, day, nil))
+	yesterdayAS.Set(NewMockUnitAllocation("c", yesterday, day, nil))
 
 	todayAS := NewAllocationSet(today, tomorrow)
-	todayAS.Set(NewUnitAllocation("a", today, day, nil))
-	todayAS.Set(NewUnitAllocation("b", today, day, nil))
-	todayAS.Set(NewUnitAllocation("c", today, day, nil))
+	todayAS.Set(NewMockUnitAllocation("a", today, day, nil))
+	todayAS.Set(NewMockUnitAllocation("b", today, day, nil))
+	todayAS.Set(NewMockUnitAllocation("c", today, day, nil))
 
 	var nilASR *AllocationSetRange
 	thisASR := NewAllocationSetRange(yesterdayAS.Clone(), todayAS.Clone())

+ 26 - 26
pkg/kubecost/asset_test.go

@@ -673,7 +673,7 @@ func TestAssetSet_AggregateBy(t *testing.T) {
 	// 1  Single-aggregation
 
 	// 1a []AssetProperty=[Cluster]
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	err = as.AggregateBy([]string{string(AssetClusterProp)}, nil)
 	if err != nil {
 		t.Fatalf("AssetSet.AggregateBy: unexpected error: %s", err)
@@ -685,7 +685,7 @@ func TestAssetSet_AggregateBy(t *testing.T) {
 	}, nil)
 
 	// 1b []AssetProperty=[Type]
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	err = as.AggregateBy([]string{string(AssetTypeProp)}, nil)
 	if err != nil {
 		t.Fatalf("AssetSet.AggregateBy: unexpected error: %s", err)
@@ -697,7 +697,7 @@ func TestAssetSet_AggregateBy(t *testing.T) {
 	}, nil)
 
 	// 1c []AssetProperty=[Nil]
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	err = as.AggregateBy([]string{}, nil)
 	if err != nil {
 		t.Fatalf("AssetSet.AggregateBy: unexpected error: %s", err)
@@ -707,7 +707,7 @@ func TestAssetSet_AggregateBy(t *testing.T) {
 	}, nil)
 
 	// 1d []AssetProperty=nil
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	err = as.AggregateBy(nil, nil)
 	if err != nil {
 		t.Fatalf("AssetSet.AggregateBy: unexpected error: %s", err)
@@ -727,7 +727,7 @@ func TestAssetSet_AggregateBy(t *testing.T) {
 	}, nil)
 
 	// 1e aggregateBy []string=["label:test"]
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	err = as.AggregateBy([]string{"label:test"}, nil)
 	if err != nil {
 		t.Fatalf("AssetSet.AggregateBy: unexpected error: %s", err)
@@ -740,7 +740,7 @@ func TestAssetSet_AggregateBy(t *testing.T) {
 	// 2  Multi-aggregation
 
 	// 2a []AssetProperty=[Cluster,Type]
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	err = as.AggregateBy([]string{string(AssetClusterProp), string(AssetTypeProp)}, nil)
 	if err != nil {
 		t.Fatalf("AssetSet.AggregateBy: unexpected error: %s", err)
@@ -758,7 +758,7 @@ func TestAssetSet_AggregateBy(t *testing.T) {
 	// 3  Share resources
 
 	// 3a Shared hourly cost > 0.0
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	err = as.AggregateBy([]string{string(AssetTypeProp)}, &AssetAggregationOptions{
 		SharedHourlyCosts: map[string]float64{"shared1": 0.5},
 	})
@@ -784,7 +784,7 @@ func TestAssetSet_FindMatch(t *testing.T) {
 	var err error
 
 	// Assert success of a simple match of Type and ProviderID
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	query = NewNode("", "", "gcp-node3", s, e, w)
 	match, err = as.FindMatch(query, []string{string(AssetTypeProp), string(AssetProviderIDProp)})
 	if err != nil {
@@ -792,7 +792,7 @@ func TestAssetSet_FindMatch(t *testing.T) {
 	}
 
 	// Assert error of a simple non-match of Type and ProviderID
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	query = NewNode("", "", "aws-node3", s, e, w)
 	match, err = as.FindMatch(query, []string{string(AssetTypeProp), string(AssetProviderIDProp)})
 	if err == nil {
@@ -800,7 +800,7 @@ func TestAssetSet_FindMatch(t *testing.T) {
 	}
 
 	// Assert error of matching ProviderID, but not Type
-	as = GenerateAssetSet(startYesterday)
+	as = GenerateMockAssetSet(startYesterday)
 	query = NewCloud(ComputeCategory, "gcp-node3", s, e, w)
 	match, err = as.FindMatch(query, []string{string(AssetTypeProp), string(AssetProviderIDProp)})
 	if err == nil {
@@ -823,9 +823,9 @@ func TestAssetSetRange_Accumulate(t *testing.T) {
 	var err error
 
 	asr = NewAssetSetRange(
-		GenerateAssetSet(startD0),
-		GenerateAssetSet(startD1),
-		GenerateAssetSet(startD2),
+		GenerateMockAssetSet(startD0),
+		GenerateMockAssetSet(startD1),
+		GenerateMockAssetSet(startD2),
 	)
 	err = asr.AggregateBy(nil, nil)
 	as, err = asr.Accumulate()
@@ -847,9 +847,9 @@ func TestAssetSetRange_Accumulate(t *testing.T) {
 	}, nil)
 
 	asr = NewAssetSetRange(
-		GenerateAssetSet(startD0),
-		GenerateAssetSet(startD1),
-		GenerateAssetSet(startD2),
+		GenerateMockAssetSet(startD0),
+		GenerateMockAssetSet(startD1),
+		GenerateMockAssetSet(startD2),
 	)
 	err = asr.AggregateBy([]string{}, nil)
 	as, err = asr.Accumulate()
@@ -861,9 +861,9 @@ func TestAssetSetRange_Accumulate(t *testing.T) {
 	}, nil)
 
 	asr = NewAssetSetRange(
-		GenerateAssetSet(startD0),
-		GenerateAssetSet(startD1),
-		GenerateAssetSet(startD2),
+		GenerateMockAssetSet(startD0),
+		GenerateMockAssetSet(startD1),
+		GenerateMockAssetSet(startD2),
 	)
 	err = asr.AggregateBy([]string{string(AssetTypeProp)}, nil)
 	if err != nil {
@@ -880,9 +880,9 @@ func TestAssetSetRange_Accumulate(t *testing.T) {
 	}, nil)
 
 	asr = NewAssetSetRange(
-		GenerateAssetSet(startD0),
-		GenerateAssetSet(startD1),
-		GenerateAssetSet(startD2),
+		GenerateMockAssetSet(startD0),
+		GenerateMockAssetSet(startD1),
+		GenerateMockAssetSet(startD2),
 	)
 	err = asr.AggregateBy([]string{string(AssetClusterProp)}, nil)
 	if err != nil {
@@ -902,8 +902,8 @@ func TestAssetSetRange_Accumulate(t *testing.T) {
 	// is empty (this was previously an issue)
 	asr = NewAssetSetRange(
 		NewAssetSet(startD0, startD1),
-		GenerateAssetSet(startD1),
-		GenerateAssetSet(startD2),
+		GenerateMockAssetSet(startD1),
+		GenerateMockAssetSet(startD2),
 	)
 
 	err = asr.AggregateBy([]string{string(AssetTypeProp)}, nil)
@@ -1065,7 +1065,7 @@ func TestAssetToExternalAllocation(t *testing.T) {
 // })
 // }
 
-// // GenerateAssetSet generates the following topology:
+// // GenerateMockAssetSet generates the following topology:
 // //
 // // | Asset                        | Cost |  Adj |
 // // +------------------------------+------+------+
@@ -1094,7 +1094,7 @@ func TestAssetToExternalAllocation(t *testing.T) {
 // // +------------------------------+------+------+
 // //   total                          57.00   3.00
 // // +------------------------------+------+------+
-// func GenerateAssetSet(start time.Time) *AssetSet {
+// func GenerateMockAssetSet(start time.Time) *AssetSet {
 // end := start.Add(day)
 // window := NewWindow(&start, &end)
 

+ 9 - 9
pkg/kubecost/kubecost_codecs_test.go

@@ -25,9 +25,9 @@ func BenchmarkAllocationSetRange_BinaryEncoding(b *testing.B) {
 	var err error
 
 	asr0 = NewAllocationSetRange(
-		GenerateAllocationSetClusterIdle(startD0),
-		GenerateAllocationSetClusterIdle(startD1),
-		GenerateAllocationSetClusterIdle(startD2),
+		GenerateMockAllocationSetClusterIdle(startD0),
+		GenerateMockAllocationSetClusterIdle(startD1),
+		GenerateMockAllocationSetClusterIdle(startD2),
 	)
 
 	for it := 0; it < b.N; it++ {
@@ -90,9 +90,9 @@ func TestAllocationSetRange_BinaryEncoding(t *testing.T) {
 	var err error
 
 	asr0 = NewAllocationSetRange(
-		GenerateAllocationSetClusterIdle(startD0),
-		GenerateAllocationSetClusterIdle(startD1),
-		GenerateAllocationSetClusterIdle(startD2),
+		GenerateMockAllocationSetClusterIdle(startD0),
+		GenerateMockAllocationSetClusterIdle(startD1),
+		GenerateMockAllocationSetClusterIdle(startD2),
 	)
 
 	bs, err = asr0.MarshalBinary()
@@ -212,9 +212,9 @@ func TestAssetSetRange_BinaryEncoding(t *testing.T) {
 	var err error
 
 	asr0 = NewAssetSetRange(
-		GenerateAssetSet(startD0),
-		GenerateAssetSet(startD1),
-		GenerateAssetSet(startD2),
+		GenerateMockAssetSet(startD0),
+		GenerateMockAssetSet(startD1),
+		GenerateMockAssetSet(startD2),
 	)
 
 	bs, err = asr0.MarshalBinary()

+ 37 - 37
pkg/kubecost/mock.go

@@ -8,8 +8,8 @@ const gb = 1024 * 1024 * 1024
 const day = 24 * time.Hour
 var disk = PVKey{}
 
-// NewUnitAllocation creates an *Allocation with all of its float64 values set to 1 and generic properties if not provided in arg
-func NewUnitAllocation(name string, start time.Time, resolution time.Duration, props *AllocationProperties) *Allocation {
+// NewMockUnitAllocation creates an *Allocation with all of its float64 values set to 1 and generic properties if not provided in arg
+func NewMockUnitAllocation(name string, start time.Time, resolution time.Duration, props *AllocationProperties) *Allocation {
 	if name == "" {
 		name = "cluster1/namespace1/pod1/container1"
 	}
@@ -73,33 +73,33 @@ func NewUnitAllocation(name string, start time.Time, resolution time.Duration, p
 	return alloc
 }
 
-// GenerateAllocationSetClusterIdle creates generic allocation set which includes an idle set broken down by cluster
-func GenerateAllocationSetClusterIdle(start time.Time) *AllocationSet {
+// GenerateMockAllocationSetClusterIdle creates generic allocation set which includes an idle set broken down by cluster
+func GenerateMockAllocationSetClusterIdle(start time.Time) *AllocationSet {
 	// Cluster Idle allocations
-	a1i := NewUnitAllocation(fmt.Sprintf("cluster1/%s", IdleSuffix), start, day, &AllocationProperties{
+	a1i := NewMockUnitAllocation(fmt.Sprintf("cluster1/%s", IdleSuffix), start, day, &AllocationProperties{
 		Cluster: "cluster1",
 	})
 	a1i.CPUCost = 5.0
 	a1i.RAMCost = 15.0
 	a1i.GPUCost = 0.0
 
-	a2i := NewUnitAllocation(fmt.Sprintf("cluster2/%s", IdleSuffix), start, day, &AllocationProperties{
+	a2i := NewMockUnitAllocation(fmt.Sprintf("cluster2/%s", IdleSuffix), start, day, &AllocationProperties{
 		Cluster: "cluster2",
 	})
 	a2i.CPUCost = 5.0
 	a2i.RAMCost = 5.0
 	a2i.GPUCost = 0.0
 
-	as := GenerateAllocationSet(start)
+	as := GenerateMockAllocationSet(start)
 	as.Insert(a1i)
 	as.Insert(a2i)
 	return as
 }
 
-// GenerateAllocationSetNodeIdle creates generic allocation set which includes an idle set broken down by node
-func GenerateAllocationSetNodeIdle(start time.Time) *AllocationSet {
+// GenerateMockAllocationSetNodeIdle creates generic allocation set which includes an idle set broken down by node
+func GenerateMockAllocationSetNodeIdle(start time.Time) *AllocationSet {
 	// Node Idle allocations
-	a11i := NewUnitAllocation(fmt.Sprintf("c1nodes/%s", IdleSuffix), start, day, &AllocationProperties{
+	a11i := NewMockUnitAllocation(fmt.Sprintf("c1nodes/%s", IdleSuffix), start, day, &AllocationProperties{
 		Cluster:    "cluster1",
 		Node:       "c1nodes",
 		ProviderID: "c1nodes",
@@ -108,7 +108,7 @@ func GenerateAllocationSetNodeIdle(start time.Time) *AllocationSet {
 	a11i.RAMCost = 15.0
 	a11i.GPUCost = 0.0
 
-	a21i := NewUnitAllocation(fmt.Sprintf("node1/%s", IdleSuffix), start, day, &AllocationProperties{
+	a21i := NewMockUnitAllocation(fmt.Sprintf("node1/%s", IdleSuffix), start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Node:       "node1",
 		ProviderID: "node1",
@@ -117,7 +117,7 @@ func GenerateAllocationSetNodeIdle(start time.Time) *AllocationSet {
 	a21i.RAMCost = 1.666667
 	a21i.GPUCost = 0.0
 
-	a22i := NewUnitAllocation(fmt.Sprintf("node2/%s", IdleSuffix), start, day, &AllocationProperties{
+	a22i := NewMockUnitAllocation(fmt.Sprintf("node2/%s", IdleSuffix), start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Node:       "node2",
 		ProviderID: "node2",
@@ -126,7 +126,7 @@ func GenerateAllocationSetNodeIdle(start time.Time) *AllocationSet {
 	a22i.RAMCost = 1.666667
 	a22i.GPUCost = 0.0
 
-	a23i := NewUnitAllocation(fmt.Sprintf("node3/%s", IdleSuffix), start, day, &AllocationProperties{
+	a23i := NewMockUnitAllocation(fmt.Sprintf("node3/%s", IdleSuffix), start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Node:       "node3",
 		ProviderID: "node3",
@@ -136,7 +136,7 @@ func GenerateAllocationSetNodeIdle(start time.Time) *AllocationSet {
 	a23i.RAMCost = 1.666667
 	a23i.GPUCost = 0.0
 
-	as := GenerateAllocationSet(start)
+	as := GenerateMockAllocationSet(start)
 	as.Insert(a11i)
 	as.Insert(a21i)
 	as.Insert(a22i)
@@ -144,11 +144,11 @@ func GenerateAllocationSetNodeIdle(start time.Time) *AllocationSet {
 	return as
 }
 
-// GenerateAllocationSet creates generic allocation set without idle allocations
-func GenerateAllocationSet(start time.Time) *AllocationSet {
+// GenerateMockAllocationSet creates generic allocation set without idle allocations
+func GenerateMockAllocationSet(start time.Time) *AllocationSet {
 
 	// Active allocations
-	a1111 := NewUnitAllocation("cluster1/namespace1/pod1/container1", start, day, &AllocationProperties{
+	a1111 := NewMockUnitAllocation("cluster1/namespace1/pod1/container1", start, day, &AllocationProperties{
 		Cluster:    "cluster1",
 		Namespace:  "namespace1",
 		Pod:        "pod1",
@@ -157,7 +157,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 	})
 	a1111.RAMCost = 11.00
 
-	a11abc2 := NewUnitAllocation("cluster1/namespace1/pod-abc/container2", start, day, &AllocationProperties{
+	a11abc2 := NewMockUnitAllocation("cluster1/namespace1/pod-abc/container2", start, day, &AllocationProperties{
 		Cluster:    "cluster1",
 		Namespace:  "namespace1",
 		Pod:        "pod-abc",
@@ -165,7 +165,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "c1nodes",
 	})
 
-	a11def3 := NewUnitAllocation("cluster1/namespace1/pod-def/container3", start, day, &AllocationProperties{
+	a11def3 := NewMockUnitAllocation("cluster1/namespace1/pod-def/container3", start, day, &AllocationProperties{
 		Cluster:    "cluster1",
 		Namespace:  "namespace1",
 		Pod:        "pod-def",
@@ -173,7 +173,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "c1nodes",
 	})
 
-	a12ghi4 := NewUnitAllocation("cluster1/namespace2/pod-ghi/container4", start, day, &AllocationProperties{
+	a12ghi4 := NewMockUnitAllocation("cluster1/namespace2/pod-ghi/container4", start, day, &AllocationProperties{
 		Cluster:    "cluster1",
 		Namespace:  "namespace2",
 		Pod:        "pod-ghi",
@@ -181,7 +181,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "c1nodes",
 	})
 
-	a12ghi5 := NewUnitAllocation("cluster1/namespace2/pod-ghi/container5", start, day, &AllocationProperties{
+	a12ghi5 := NewMockUnitAllocation("cluster1/namespace2/pod-ghi/container5", start, day, &AllocationProperties{
 		Cluster:    "cluster1",
 		Namespace:  "namespace2",
 		Pod:        "pod-ghi",
@@ -189,7 +189,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "c1nodes",
 	})
 
-	a12jkl6 := NewUnitAllocation("cluster1/namespace2/pod-jkl/container6", start, day, &AllocationProperties{
+	a12jkl6 := NewMockUnitAllocation("cluster1/namespace2/pod-jkl/container6", start, day, &AllocationProperties{
 		Cluster:    "cluster1",
 		Namespace:  "namespace2",
 		Pod:        "pod-jkl",
@@ -197,7 +197,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "c1nodes",
 	})
 
-	a22mno4 := NewUnitAllocation("cluster2/namespace2/pod-mno/container4", start, day, &AllocationProperties{
+	a22mno4 := NewMockUnitAllocation("cluster2/namespace2/pod-mno/container4", start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Namespace:  "namespace2",
 		Pod:        "pod-mno",
@@ -205,7 +205,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "node1",
 	})
 
-	a22mno5 := NewUnitAllocation("cluster2/namespace2/pod-mno/container5", start, day, &AllocationProperties{
+	a22mno5 := NewMockUnitAllocation("cluster2/namespace2/pod-mno/container5", start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Namespace:  "namespace2",
 		Pod:        "pod-mno",
@@ -213,7 +213,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "node1",
 	})
 
-	a22pqr6 := NewUnitAllocation("cluster2/namespace2/pod-pqr/container6", start, day, &AllocationProperties{
+	a22pqr6 := NewMockUnitAllocation("cluster2/namespace2/pod-pqr/container6", start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Namespace:  "namespace2",
 		Pod:        "pod-pqr",
@@ -221,7 +221,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "node2",
 	})
 
-	a23stu7 := NewUnitAllocation("cluster2/namespace3/pod-stu/container7", start, day, &AllocationProperties{
+	a23stu7 := NewMockUnitAllocation("cluster2/namespace3/pod-stu/container7", start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Namespace:  "namespace3",
 		Pod:        "pod-stu",
@@ -229,7 +229,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "node2",
 	})
 
-	a23vwx8 := NewUnitAllocation("cluster2/namespace3/pod-vwx/container8", start, day, &AllocationProperties{
+	a23vwx8 := NewMockUnitAllocation("cluster2/namespace3/pod-vwx/container8", start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Namespace:  "namespace3",
 		Pod:        "pod-vwx",
@@ -237,7 +237,7 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 		ProviderID: "node3",
 	})
 
-	a23vwx9 := NewUnitAllocation("cluster2/namespace3/pod-vwx/container9", start, day, &AllocationProperties{
+	a23vwx9 := NewMockUnitAllocation("cluster2/namespace3/pod-vwx/container9", start, day, &AllocationProperties{
 		Cluster:    "cluster2",
 		Namespace:  "namespace3",
 		Pod:        "pod-vwx",
@@ -303,9 +303,9 @@ func GenerateAllocationSet(start time.Time) *AllocationSet {
 	)
 }
 
-// GenerateAllocationSetWithAssetProperties with no idle and connections to Assets in properties
-func GenerateAllocationSetWithAssetProperties(start time.Time)  *AllocationSet {
-	as := GenerateAllocationSet(start)
+// GenerateMockAllocationSetWithAssetProperties with no idle and connections to Assets in properties
+func GenerateMockAllocationSetWithAssetProperties(start time.Time)  *AllocationSet {
+	as := GenerateMockAllocationSet(start)
 	disk1 := PVKey{
 		Cluster: "cluster2",
 		Name:    "disk1",
@@ -343,8 +343,8 @@ func GenerateAllocationSetWithAssetProperties(start time.Time)  *AllocationSet {
 	return as
 }
 
-// GenerateAssetSets creates generic AssetSets
-func GenerateAssetSets(start, end time.Time) []*AssetSet {
+// GenerateMockAssetSets creates generic AssetSets
+func GenerateMockAssetSets(start, end time.Time) []*AssetSet {
 	var assetSets []*AssetSet
 
 	// Create an AssetSet representing cluster costs for two clusters (cluster1
@@ -353,7 +353,7 @@ func GenerateAssetSets(start, end time.Time) []*AssetSet {
 	// by type, here we will provide multiple Nodes for one of the clusters to
 	// make sure the function still holds.
 
-	// NOTE: we're re-using GenerateAllocationSet so this has to line up with
+	// NOTE: we're re-using GenerateMockAllocationSet so this has to line up with
 	// the allocated node costs from that function. See table above.
 
 	// | Hierarchy                               | Cost |  CPU |  RAM |  GPU | Adjustment |
@@ -469,7 +469,7 @@ func GenerateAssetSets(start, end time.Time) []*AssetSet {
 		cluster2ClusterManagement, c1Network, node1Network, node2Network, node3Network, cluster2LoadBalancer1, cluster2LoadBalancer2)
 	assetSets = append(assetSets, assetSet1)
 
-	// NOTE: we're re-using GenerateAllocationSet so this has to line up with
+	// NOTE: we're re-using GenerateMockAllocationSet so this has to line up with
 	// the allocated node costs from that function. See table above.
 
 	// | Hierarchy                               | Cost |  CPU |  RAM |  GPU | Adjustment |
@@ -547,7 +547,7 @@ func GenerateAssetSets(start, end time.Time) []*AssetSet {
 	return assetSets
 }
 
-// GenerateAssetSet generates the following topology:
+// GenerateMockAssetSet generates the following topology:
 //
 // | Asset                        | Cost |  Adj |
 // +------------------------------+------+------+
@@ -576,7 +576,7 @@ func GenerateAssetSets(start, end time.Time) []*AssetSet {
 // +------------------------------+------+------+
 //   total                          57.00   3.00
 // +------------------------------+------+------+
-func GenerateAssetSet(start time.Time) *AssetSet {
+func GenerateMockAssetSet(start time.Time) *AssetSet {
 	end := start.Add(day)
 	window := NewWindow(&start, &end)