Store: use "at" suffix for time base fields more consistently (#58486)
This commit is contained in:
@@ -59,12 +59,12 @@ func requireObjectMatch(t *testing.T, obj *object.RawObject, m rawObjectMatcher)
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.createdRange) == 2 && !timestampInRange(obj.Created, m.createdRange) {
|
||||
mismatches += fmt.Sprintf("expected Created range: [from %s to %s], actual created: %s\n", m.createdRange[0], m.createdRange[1], time.UnixMilli(obj.Created))
|
||||
if len(m.createdRange) == 2 && !timestampInRange(obj.CreatedAt, m.createdRange) {
|
||||
mismatches += fmt.Sprintf("expected Created range: [from %s to %s], actual created: %s\n", m.createdRange[0], m.createdRange[1], time.UnixMilli(obj.CreatedAt))
|
||||
}
|
||||
|
||||
if len(m.updatedRange) == 2 && !timestampInRange(obj.Updated, m.updatedRange) {
|
||||
mismatches += fmt.Sprintf("expected Updated range: [from %s to %s], actual updated: %s\n", m.updatedRange[0], m.updatedRange[1], time.UnixMilli(obj.Updated))
|
||||
if len(m.updatedRange) == 2 && !timestampInRange(obj.UpdatedAt, m.updatedRange) {
|
||||
mismatches += fmt.Sprintf("expected Updated range: [from %s to %s], actual updated: %s\n", m.updatedRange[0], m.updatedRange[1], time.UnixMilli(obj.UpdatedAt))
|
||||
}
|
||||
|
||||
if m.createdBy != "" && m.createdBy != obj.CreatedBy {
|
||||
@@ -98,8 +98,8 @@ func requireVersionMatch(t *testing.T, obj *object.ObjectVersionInfo, m objectVe
|
||||
mismatches += fmt.Sprintf("expected etag: %s, actual etag: %s\n", *m.etag, obj.ETag)
|
||||
}
|
||||
|
||||
if len(m.updatedRange) == 2 && !timestampInRange(obj.Updated, m.updatedRange) {
|
||||
mismatches += fmt.Sprintf("expected updatedRange range: [from %s to %s], actual updated: %s\n", m.updatedRange[0], m.updatedRange[1], time.UnixMilli(obj.Updated))
|
||||
if len(m.updatedRange) == 2 && !timestampInRange(obj.UpdatedAt, m.updatedRange) {
|
||||
mismatches += fmt.Sprintf("expected updatedRange range: [from %s to %s], actual updated: %s\n", m.updatedRange[0], m.updatedRange[1], time.UnixMilli(obj.UpdatedAt))
|
||||
}
|
||||
|
||||
if m.updatedBy != "" && m.updatedBy != obj.UpdatedBy {
|
||||
|
||||
Reference in New Issue
Block a user