(t *testing.T)
| 656 | } |
| 657 | |
| 658 | func TestCacheSetModTime(t *testing.T) { |
| 659 | _, c := newTestCache(t) |
| 660 | |
| 661 | t1 := time.Date(2010, 1, 2, 3, 4, 5, 9, time.UTC) |
| 662 | |
| 663 | potato := c.Item("potato") |
| 664 | require.NoError(t, potato.Open(nil)) |
| 665 | require.NoError(t, potato.Truncate(5)) |
| 666 | require.NoError(t, potato.Close(nil)) |
| 667 | |
| 668 | c.SetModTime("potato", t1) |
| 669 | osPath := potato.c.toOSPath("potato") |
| 670 | fi, err := os.Stat(osPath) |
| 671 | require.NoError(t, err) |
| 672 | |
| 673 | fstest.AssertTimeEqualWithPrecision(t, "potato", t1, fi.ModTime(), time.Second) |
| 674 | } |
| 675 | |
| 676 | func TestCacheTotaInUse(t *testing.T) { |
| 677 | _, c := newTestCache(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…