Skip to content

Commit 25d6a08

Browse files
Wei WengWei Weng
authored andcommitted
fix unit test
Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
1 parent c397876 commit 25d6a08

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/controllers/rollout/controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,7 @@ func TestUpdateBindings(t *testing.T) {
987987
}
988988

989989
func TestIsBindingReady(t *testing.T) {
990+
now := time.Now() // Shadow package-level 'now' for accurate timing in this test
990991
tests := map[string]struct {
991992
binding *placementv1beta1.ClusterResourceBinding
992993
readyTimeCutOff time.Time
@@ -1217,6 +1218,7 @@ func TestIsBindingReady(t *testing.T) {
12171218
}
12181219

12191220
func TestPickBindingsToRoll(t *testing.T) {
1221+
now := time.Now() // Shadow package-level 'now' for accurate timing in this test
12201222
tests := map[string]struct {
12211223
allBindings []*placementv1beta1.ClusterResourceBinding
12221224
latestResourceSnapshotName string

0 commit comments

Comments
 (0)