Skip to content

Commit 80cd55a

Browse files
anoopcs9mergify[bot]
authored andcommitted
rbd/admin: Fix snapshot schedule start-time format
The start‑time argument always accepted an ISO 8601 timestamp, but it wasn’t enforced until it was fixed[1] recently. Therefore, it now conforms to the requirement in the corresponding tests. [1] ceph/ceph#66735 Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
1 parent 39aeb21 commit 80cd55a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rbd/admin/msschedule_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"errors"
88
"sort"
99
"testing"
10+
"time"
1011

1112
"github.com/stretchr/testify/assert"
1213

@@ -211,7 +212,7 @@ func TestMirrorSnapshotScheduleAddRemove(t *testing.T) {
211212
assert.NoError(t, err)
212213
})
213214
t.Run("startTime", func(t *testing.T) {
214-
stime := StartTime("12:00:00")
215+
stime := StartTime(time.Now().Format("2006-01-02T15:04:00"))
215216
err := scheduler.Add(NewLevelSpec(defaultPoolName, "", ""), Interval("1d"), stime)
216217
assert.NoError(t, err)
217218
err = scheduler.Remove(NewLevelSpec(defaultPoolName, "", ""), Interval("1d"), stime)

0 commit comments

Comments
 (0)