Add environment check in the tests.