-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
scripts/bats/test/libs/partitions.bash (in the test suite invoked with make bats-test) uses code like the following:
local LOWER_BOUND=$(date -d "@$(( $(date +%s) + 86400 * $TIMEDELTA))" +"%Y-%m-%d")
local UPPER_BOUND=$(date -d "@$(( $(date +%s) + 86400 * $TIMEDELTA + 86400))" +"%Y-%m-%d")
...
echo $(date -d "@$(( $(date +%s) + 86400 * $TIMEDELTA))" +"${PARENT_TABLE}_%Y_%m_%d")
This is problematic on MacOS local development since the -d option is specific to GNU date and does not work with MacOS date built-in command, making the test fail.
MacOS users can install GNU date through the coreutils package as described on apple.stackexchange.com in How to have GNU's date in OS X?, but it would be better to remove that dependency.
The code adds or substracts N days to the current date and produces a result in YYYY-MM-DD format.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working