Skip to content

Commit

Permalink
*: adjust case
Browse files Browse the repository at this point in the history
Signed-off-by: BornChanger <dawn_catcher@126.com>
  • Loading branch information
BornChanger committed Jan 12, 2024
1 parent 6a39b11 commit 645a4b6
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ func TestCalculateExpiredBackups(t *testing.T) {

var (
now = time.Now()
last10Min = now.Add(-time.Minute * 10).Unix()
last1Day = now.Add(-time.Hour * 24 * 1).Unix()
last2Day = now.Add(-time.Hour * 24 * 2).Unix()
last3Day = now.Add(-time.Hour * 24 * 3).Unix()
last10Min = now.Add(-time.Minute * 10)
last1Day = now.Add(-time.Hour * 24 * 1)
last2Day = now.Add(-time.Hour * 24 * 2)
last3Day = now.Add(-time.Hour * 24 * 3)
)

testCases := []*testCase{
Expand Down Expand Up @@ -387,12 +387,12 @@ func (h *helper) updateBackup(bk *v1alpha1.VolumeBackup) {
}, time.Second*10).Should(BeNil())
}

func fakeBackup(ts *int64) *v1alpha1.VolumeBackup {
func fakeBackup(ts *time.Time) *v1alpha1.VolumeBackup {
backup := &v1alpha1.VolumeBackup{}
if ts == nil {
return backup
}
backup.Status.CommitTs = getTSOStr(*ts)
backup.CreationTimestamp = metav1.Time{Time: *ts}
return backup
}

Expand Down

0 comments on commit 645a4b6

Please sign in to comment.