m-lab / etl-gardener

Gardener provides services for maintaining and reprocessing mlab data.
Apache License 2.0
13 stars 5 forks source link

Test boundary conditions explicitly #396

Closed stephen-soltesz closed 1 year ago

stephen-soltesz commented 1 year ago

The previous HistoricalIterator unit test expected results were not resilient to the time of day the test ran. So, just after UTC midnight the results would be different than just after UTC midnight + 12hrs.

This change updates the unit tests to use explicit times by overriding time.Now using monkey.Patch so that we can test independently of time of day. This change adds similar sequence handling to the DailyIterator unit tests also.


This change is Reviewable

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3436


Files with Coverage Reduction New Missed Lines %
job-service/iterators.go 2 97.59%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 3433: -0.09%
Covered Lines: 1623
Relevant Lines: 2193

💛 - Coveralls