fix sorted test

This commit is contained in:
Steven Allen 2021-01-27 13:05:14 -08:00
parent 56054b0ad3
commit 9a03c003fe

View File

@ -207,7 +207,7 @@ func (us UpgradeSchedule) Validate() error {
}
}
if !sort.SliceIsSorted(u.PreMigrations, func(i, j int) bool {
return u.PreMigrations[i].When < u.PreMigrations[j].When
return u.PreMigrations[i].When > u.PreMigrations[j].When //nolint:scopelint,gosec
}) {
return xerrors.Errorf("pre-migrations must be sorted by start epoch")
}