Replace os.Setenv calls with t.Setenv in test functions to ensure proper test environment cleanup and better test isolation.