mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04:00
Simplify StartTime assignment in unit test setup.
Remove redundant IsZero check since promqltest.LazyLoader already handles zero StartTime by defaulting to Unix epoch. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
This commit is contained in:
parent
1a853e23db
commit
4620c8ac71
1 changed files with 1 additions and 5 deletions
|
|
@ -232,11 +232,7 @@ func (tg *testGroup) test(testname string, evalInterval time.Duration, groupOrde
|
|||
}
|
||||
// Setup testing suite.
|
||||
// Set the start time from the test group.
|
||||
if tg.StartTimestamp.IsZero() {
|
||||
queryOpts.StartTime = time.Unix(0, 0).UTC()
|
||||
} else {
|
||||
queryOpts.StartTime = tg.StartTimestamp.Time
|
||||
}
|
||||
queryOpts.StartTime = tg.StartTimestamp.Time
|
||||
suite, err := promqltest.NewLazyLoader(tg.seriesLoadingString(), queryOpts)
|
||||
if err != nil {
|
||||
return []error{err}
|
||||
|
|
|
|||
Loading…
Reference in a new issue