Created
November 18, 2019 17:39
-
-
Save rigelreyes/893ca11ae988355a8d89ce438f12ff47 to your computer and use it in GitHub Desktop.
Sentinel Test files
This file contains hidden or 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
import "time" | |
# Expect requests to only happen during work days (Monday through Friday) | |
# 0 for Sunday and 6 for Saturday | |
workdays = rule { | |
time.now.weekday > 0 and time.now.weekday < 6 | |
} | |
# Expect requests to only happen during work hours (7:00 am - 6:00 pm) | |
workhours = rule { | |
time.now.hour > 7 and time.now.hour < 18 | |
} | |
main = rule { | |
workdays and workhours | |
} |
This file contains hidden or 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
{ | |
"global": { | |
"timespace": { | |
"weekday": 0, | |
"hour": 12 | |
} | |
}, | |
"test": { | |
"main": false | |
} | |
} |
This file contains hidden or 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
{ | |
"global": { | |
"timespace": { | |
"weekday": 1, | |
"hour": 12 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment