tests: use getenv() to access environment variable