-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update gronx dep and fix scaler tests (#58)
- Loading branch information
Showing
5 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package schedule | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/adhocore/gronx" | ||
) | ||
|
||
type FakeSegmentChecker struct { | ||
checker gronx.Checker | ||
} | ||
|
||
func NewFakeSegmentChecker() *FakeSegmentChecker { | ||
checker := &gronx.SegmentChecker{} | ||
checker.SetRef(time.Date(2024, time.July, 1, 1, 1, 0, 0, time.UTC)) | ||
|
||
return &FakeSegmentChecker{checker} | ||
} | ||
|
||
func (c *FakeSegmentChecker) GetRef() time.Time { | ||
return c.checker.GetRef() | ||
} | ||
|
||
func (c *FakeSegmentChecker) SetRef(_ time.Time) {} | ||
|
||
func (c *FakeSegmentChecker) CheckDue(segment string, pos int) (due bool, err error) { | ||
return c.checker.CheckDue(segment, pos) | ||
} |