fix leaking globals in swagger tests