Commit 750a4e5b authored by Sebastian Stark's avatar Sebastian Stark

move test schedules from code to testdata

parent 1a2406df
......@@ -54,6 +54,7 @@ func mockConfig() {
Schedule: "testing2",
MaxKeep: 2,
NoPurge: false,
SchedFile: "testdata/snaprd.schedules",
}
}
......@@ -84,6 +85,7 @@ func TestPrune(t *testing.T) {
log.SetOutput(ioutil.Discard)
mockConfig()
mockRepository()
schedules.addFromFile(config.SchedFile)
defer os.RemoveAll(config.repository)
cl := newSkewClock(startAt)
c := make(chan *snapshot, 100)
......
......@@ -60,8 +60,6 @@ func (schl *scheduleList) String() string {
var schedules = scheduleList{
"longterm": {hour * 6, day, week, month, long},
"shortterm": {minute * 10, hour * 2, day, week, month, long},
"testing": {second * 5, second * 20, second * 140, second * 280, long},
"testing2": {second * 5, second * 20, second * 40, second * 80, long},
}
// addFromFile adds an external JSON file to the list of available scheds
......
{
"test1" : [ { "d":1}, {"w":1}, {"M":1}, {"l":1} ]
"test1" : [ { "d":1}, {"w":1}, {"M":1}, {"l":1} ],
"testing": [ {"s":5}, {"s":20}, {"s":140}, {"s":280}, {"l":1} ],
"testing2": [ {"s":5}, {"s":20}, {"s":40}, {"s":80}, {"l":1} ]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment