AssertTimeEqualWithPrecision checks that want is within precision of got, asserting that with t and logging remote
(t *testing.T, remote string, want, got time.Time, precision time.Duration)
| 123 | // AssertTimeEqualWithPrecision checks that want is within precision |
| 124 | // of got, asserting that with t and logging remote |
| 125 | func AssertTimeEqualWithPrecision(t *testing.T, remote string, want, got time.Time, precision time.Duration) { |
| 126 | dt, ok := CheckTimeEqualWithPrecision(want, got, precision) |
| 127 | assert.True(t, ok, fmt.Sprintf("%s: Modification time difference too big |%s| > %s (want %s vs got %s) (precision %s)", remote, dt, precision, want, got, precision)) |
| 128 | } |
| 129 | |
| 130 | // CheckModTime checks the mod time to the given precision |
| 131 | func (i *Item) CheckModTime(t *testing.T, obj fs.Object, modTime time.Time, precision time.Duration) { |
searching dependent graphs…