refactor the set_env command test.