From 4a7f76578548f9a3d2f40175be1799595c4bbb81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Wed, 30 Oct 2019 22:34:26 +0100 Subject: [PATCH] Set StartTime in Pod objects used in tests --- cluster-autoscaler/utils/test/test_utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cluster-autoscaler/utils/test/test_utils.go b/cluster-autoscaler/utils/test/test_utils.go index 0d6604d056e..a7e315c179b 100644 --- a/cluster-autoscaler/utils/test/test_utils.go +++ b/cluster-autoscaler/utils/test/test_utils.go @@ -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), @@ -54,6 +55,9 @@ func BuildTestPod(name string, cpu int64, mem int64) *apiv1.Pod { }, }, }, + Status: apiv1.PodStatus{ + StartTime: &startTime, + }, } if cpu >= 0 {