Make populate history command and tests work in all supported environments