extend fake clock

This commit is contained in:
Daniel Smith
2016-02-01 10:50:05 -08:00
parent 92ec286ecc
commit 4a7d70aef1
14 changed files with 181 additions and 40 deletions

View File

@@ -431,8 +431,8 @@ func TestGarbageCollectImageNotOldEnough(t *testing.T) {
},
}
fakeClock := util.FakeClock{Time: time.Now()}
fmt.Println(fakeClock.Now())
fakeClock := util.NewFakeClock(time.Now())
t.Log(fakeClock.Now())
require.NoError(t, manager.detectImages(fakeClock.Now()))
require.Equal(t, manager.imageRecordsLen(), 2)
// no space freed since one image is in used, and another one is not old enough