From ea6a65ae8ecceed1efc0bca17747fabde5526a07 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 17 Mar 2015 13:59:48 +1100 Subject: [PATCH] NoCachingTest.StatRenumberStat --- samples/cachingfs/caching_fs_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/samples/cachingfs/caching_fs_test.go b/samples/cachingfs/caching_fs_test.go index f215aec..fae5b17 100644 --- a/samples/cachingfs/caching_fs_test.go +++ b/samples/cachingfs/caching_fs_test.go @@ -214,10 +214,7 @@ func (t *NoCachingTest) SetUp(ti *TestInfo) { } func (t *NoCachingTest) StatStat() { - // Stat everything. fooBefore, dirBefore, barBefore := t.statAll() - - // Stat again. fooAfter, dirAfter, barAfter := t.statAll() // Make sure everything matches. @@ -231,7 +228,15 @@ func (t *NoCachingTest) StatStat() { } func (t *NoCachingTest) StatRenumberStat() { - AssertTrue(false, "TODO") + fooBefore, dirBefore, barBefore := t.statAll() + t.fs.RenumberInodes() + fooAfter, dirAfter, barAfter := t.statAll() + + // We should see different inode IDs, because the entries should not have + // been cached. + ExpectNe(getInodeID(fooBefore), getInodeID(fooAfter)) + ExpectNe(getInodeID(dirBefore), getInodeID(dirAfter)) + ExpectNe(getInodeID(barBefore), getInodeID(barAfter)) } func (t *NoCachingTest) StatMtimeStat() {