Skip to content

Commit

Permalink
Set StartTime in Pod objects used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
losipiuk committed Nov 12, 2019
1 parent 1f6f073 commit 4a7f765
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cluster-autoscaler/utils/test/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (

// BuildTestPod creates a pod with specified resources.
func BuildTestPod(name string, cpu int64, mem int64) *apiv1.Pod {
startTime := metav1.Unix(0, 0)
pod := &apiv1.Pod{
ObjectMeta: metav1.ObjectMeta{
UID: types.UID(name),
Expand All @@ -54,6 +55,9 @@ func BuildTestPod(name string, cpu int64, mem int64) *apiv1.Pod {
},
},
},
Status: apiv1.PodStatus{
StartTime: &startTime,
},
}

if cpu >= 0 {
Expand Down

0 comments on commit 4a7f765

Please sign in to comment.